From 4879be16e2141b1e8efae2498d3296064a4bb040 Mon Sep 17 00:00:00 2001 From: Bhanu Prakash Gopularam Date: Wed, 21 Dec 2016 08:12:49 +0000 Subject: [PATCH] 8160036: Java API doc for method minusMonths in LocalDateTime class needs correction Java API doc needs correction Reviewed-by: rriggs, scolebourne --- .../share/classes/java/time/LocalDateTime.java | 8 ++++---- .../share/classes/java/time/OffsetDateTime.java | 14 +++++++------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/jdk/src/java.base/share/classes/java/time/LocalDateTime.java b/jdk/src/java.base/share/classes/java/time/LocalDateTime.java index 0366333638d..e10c9c842b2 100644 --- a/jdk/src/java.base/share/classes/java/time/LocalDateTime.java +++ b/jdk/src/java.base/share/classes/java/time/LocalDateTime.java @@ -1407,8 +1407,8 @@ public final class LocalDateTime * *

* For example, 2008-02-29 (leap year) minus one year would result in the - * invalid date 2009-02-29 (standard year). Instead of returning an invalid - * result, the last valid day of the month, 2009-02-28, is selected instead. + * invalid date 2007-02-29 (standard year). Instead of returning an invalid + * result, the last valid day of the month, 2007-02-28, is selected instead. *

* This instance is immutable and unaffected by this method call. * @@ -1431,8 +1431,8 @@ public final class LocalDateTime * *

* For example, 2007-03-31 minus one month would result in the invalid date - * 2007-04-31. Instead of returning an invalid result, the last valid day - * of the month, 2007-04-30, is selected instead. + * 2007-02-31. Instead of returning an invalid result, the last valid day + * of the month, 2007-02-28, is selected instead. *

* This instance is immutable and unaffected by this method call. * diff --git a/jdk/src/java.base/share/classes/java/time/OffsetDateTime.java b/jdk/src/java.base/share/classes/java/time/OffsetDateTime.java index 34c70bce3d7..075638a6f68 100644 --- a/jdk/src/java.base/share/classes/java/time/OffsetDateTime.java +++ b/jdk/src/java.base/share/classes/java/time/OffsetDateTime.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -1393,8 +1393,8 @@ public final class OffsetDateTime * *

* For example, 2008-02-29 (leap year) minus one year would result in the - * invalid date 2009-02-29 (standard year). Instead of returning an invalid - * result, the last valid day of the month, 2009-02-28, is selected instead. + * invalid date 2007-02-29 (standard year). Instead of returning an invalid + * result, the last valid day of the month, 2007-02-28, is selected instead. *

* This instance is immutable and unaffected by this method call. * @@ -1417,8 +1417,8 @@ public final class OffsetDateTime * *

* For example, 2007-03-31 minus one month would result in the invalid date - * 2007-04-31. Instead of returning an invalid result, the last valid day - * of the month, 2007-04-30, is selected instead. + * 2007-02-31. Instead of returning an invalid result, the last valid day + * of the month, 2007-02-28, is selected instead. *

* This instance is immutable and unaffected by this method call. * @@ -1437,7 +1437,7 @@ public final class OffsetDateTime * the month and year fields as necessary to ensure the result remains valid. * The result is only invalid if the maximum/minimum year is exceeded. *

- * For example, 2008-12-31 minus one week would result in 2009-01-07. + * For example, 2009-01-07 minus one week would result in 2008-12-31. *

* This instance is immutable and unaffected by this method call. * @@ -1456,7 +1456,7 @@ public final class OffsetDateTime * month and year fields as necessary to ensure the result remains valid. * The result is only invalid if the maximum/minimum year is exceeded. *

- * For example, 2008-12-31 minus one day would result in 2009-01-01. + * For example, 2009-01-01 minus one day would result in 2008-12-31. *

* This instance is immutable and unaffected by this method call. *