8142539: Incorrect definition of ZoneOffset.MIN
8140211: Example in the Documentation is wrong for java.time.ZonedDateTime.minusHours 8139529: java.time.temporal.ChronoUnit.FOREVER typo Reviewed-by: lancea, scolebourne
This commit is contained in:
parent
7bee07b465
commit
b16bb1267a
@ -150,7 +150,7 @@ public final class ZoneOffset
|
|||||||
*/
|
*/
|
||||||
public static final ZoneOffset UTC = ZoneOffset.ofTotalSeconds(0);
|
public static final ZoneOffset UTC = ZoneOffset.ofTotalSeconds(0);
|
||||||
/**
|
/**
|
||||||
* Constant for the maximum supported offset.
|
* Constant for the minimum supported offset.
|
||||||
*/
|
*/
|
||||||
public static final ZoneOffset MIN = ZoneOffset.ofTotalSeconds(-MAX_SECONDS);
|
public static final ZoneOffset MIN = ZoneOffset.ofTotalSeconds(-MAX_SECONDS);
|
||||||
/**
|
/**
|
||||||
|
@ -1707,13 +1707,18 @@ public final class ZonedDateTime
|
|||||||
* Note that this is a different approach to that used by days, months and years,
|
* Note that this is a different approach to that used by days, months and years,
|
||||||
* thus adding one day is not the same as adding 24 hours.
|
* thus adding one day is not the same as adding 24 hours.
|
||||||
* <p>
|
* <p>
|
||||||
* For example, consider a time-zone where the spring DST cutover means that the
|
* For example, consider a time-zone, such as 'Europe/Paris', where the
|
||||||
* local times 01:00 to 01:59 occur twice changing from offset +02:00 to +01:00.
|
* Autumn DST cutover means that the local times 02:00 to 02:59 occur twice
|
||||||
|
* changing from offset +02:00 in summer to +01:00 in winter.
|
||||||
* <ul>
|
* <ul>
|
||||||
* <li>Adding one hour to 00:30+02:00 will result in 01:30+02:00
|
* <li>Adding one hour to 01:30+02:00 will result in 02:30+02:00
|
||||||
* <li>Adding one hour to 01:30+02:00 will result in 01:30+01:00
|
* (both in summer time)
|
||||||
* <li>Adding one hour to 01:30+01:00 will result in 02:30+01:00
|
* <li>Adding one hour to 02:30+02:00 will result in 02:30+01:00
|
||||||
* <li>Adding three hours to 00:30+02:00 will result in 02:30+01:00
|
* (moving from summer to winter time)
|
||||||
|
* <li>Adding one hour to 02:30+01:00 will result in 03:30+01:00
|
||||||
|
* (both in winter time)
|
||||||
|
* <li>Adding three hours to 01:30+02:00 will result in 03:30+01:00
|
||||||
|
* (moving from summer to winter time)
|
||||||
* </ul>
|
* </ul>
|
||||||
* <p>
|
* <p>
|
||||||
* This instance is immutable and unaffected by this method call.
|
* This instance is immutable and unaffected by this method call.
|
||||||
@ -1948,13 +1953,18 @@ public final class ZonedDateTime
|
|||||||
* Note that this is a different approach to that used by days, months and years,
|
* Note that this is a different approach to that used by days, months and years,
|
||||||
* thus subtracting one day is not the same as adding 24 hours.
|
* thus subtracting one day is not the same as adding 24 hours.
|
||||||
* <p>
|
* <p>
|
||||||
* For example, consider a time-zone where the spring DST cutover means that the
|
* For example, consider a time-zone, such as 'Europe/Paris', where the
|
||||||
* local times 01:00 to 01:59 occur twice changing from offset +02:00 to +01:00.
|
* Autumn DST cutover means that the local times 02:00 to 02:59 occur twice
|
||||||
|
* changing from offset +02:00 in summer to +01:00 in winter.
|
||||||
* <ul>
|
* <ul>
|
||||||
* <li>Subtracting one hour from 02:30+01:00 will result in 01:30+02:00
|
* <li>Subtracting one hour from 03:30+01:00 will result in 02:30+01:00
|
||||||
* <li>Subtracting one hour from 01:30+01:00 will result in 01:30+02:00
|
* (both in winter time)
|
||||||
* <li>Subtracting one hour from 01:30+02:00 will result in 00:30+01:00
|
* <li>Subtracting one hour from 02:30+01:00 will result in 02:30+02:00
|
||||||
* <li>Subtracting three hours from 02:30+01:00 will result in 00:30+02:00
|
* (moving from winter to summer time)
|
||||||
|
* <li>Subtracting one hour from 02:30+02:00 will result in 01:30+02:00
|
||||||
|
* (both in summer time)
|
||||||
|
* <li>Subtracting three hours from 03:30+01:00 will result in 01:30+02:00
|
||||||
|
* (moving from winter to summer time)
|
||||||
* </ul>
|
* </ul>
|
||||||
* <p>
|
* <p>
|
||||||
* This instance is immutable and unaffected by this method call.
|
* This instance is immutable and unaffected by this method call.
|
||||||
|
@ -184,8 +184,8 @@ public enum ChronoUnit implements TemporalUnit {
|
|||||||
* Artificial unit that represents the concept of forever.
|
* Artificial unit that represents the concept of forever.
|
||||||
* This is primarily used with {@link TemporalField} to represent unbounded fields
|
* This is primarily used with {@link TemporalField} to represent unbounded fields
|
||||||
* such as the year or era.
|
* such as the year or era.
|
||||||
* The estimated duration of the era is artificially defined as the largest duration
|
* The estimated duration of this unit is artificially defined as the largest duration
|
||||||
* supported by {@code Duration}.
|
* supported by {@link Duration}.
|
||||||
*/
|
*/
|
||||||
FOREVER("Forever", Duration.ofSeconds(Long.MAX_VALUE, 999_999_999));
|
FOREVER("Forever", Duration.ofSeconds(Long.MAX_VALUE, 999_999_999));
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user