/libcore/ojluni/src/test/java/time/tck/java/time/ |
D | TCKYear.java | 87 import java.time.Year; 120 private static final Year TEST_2008 = Year.of(2008); 158 Year expected = Year.now(Clock.systemDefaultZone()); in now() 159 Year test = Year.now(); in now() 164 expected = Year.now(Clock.systemDefaultZone()); in now() 165 test = Year.now(); in now() 175 Year.now((ZoneId) null); in now_ZoneId_nullZoneId() 181 Year expected = Year.now(Clock.system(zone)); in now_ZoneId() 182 Year test = Year.now(zone); in now_ZoneId() 187 expected = Year.now(Clock.system(zone)); in now_ZoneId() [all …]
|
D | TCKLocalDate.java | 102 import java.time.Year; 218 check(LocalDate.MIN, Year.MIN_VALUE, 1, 1); in constant_MIN() 223 check(LocalDate.MAX, Year.MAX_VALUE, 12, 31); in constant_MAX() 490 … assertEquals(LocalDate.ofEpochDay(MAX_VALID_EPOCHDAYS), LocalDate.of(Year.MAX_VALUE, 12, 31)); 491 assertEquals(LocalDate.ofEpochDay(MIN_VALID_EPOCHDAYS), LocalDate.of(Year.MIN_VALUE, 1, 1)); 897 TEST_2007_07_15.withYear(Year.MIN_VALUE - 1); 997 LocalDate.of(Year.MAX_VALUE, 1, 1).plus(period); 1003 LocalDate.of(Year.MIN_VALUE, 1, 1).plus(period); 1033 LocalDate.of(Year.MAX_VALUE, 1, 1).plus(1, ChronoUnit.YEARS); 1038 LocalDate.of(Year.MIN_VALUE, 1, 1).plus(-1, ChronoUnit.YEARS); [all …]
|
D | TCKYearMonth.java | 90 import java.time.Year; 234 YearMonth.of(Year.MIN_VALUE - 1, Month.JANUARY); in test_factory_intsMonth_yearTooLow() 239 YearMonth.of(Year.MAX_VALUE + 1, Month.JANUARY); in test_factory_intsMonth_dayTooHigh() 256 YearMonth.of(Year.MIN_VALUE - 1, 2); in test_factory_ints_yearTooLow() 261 YearMonth.of(Year.MAX_VALUE + 1, 2); in test_factory_ints_dayTooHigh() 318 {"+" + Year.MAX_VALUE + "-03", YearMonth.of(Year.MAX_VALUE, 3)}, in provider_goodParseData() 319 {Year.MIN_VALUE + "-03", YearMonth.of(Year.MIN_VALUE, 3)}, in provider_goodParseData() 535 assertEquals(test.with(Year.of(2000)), YearMonth.of(2000, 6)); in test_with_Year() 541 assertEquals(test.with(Year.of(2008)), test); in test_with_Year_noChange_equal() 547 test.with((Year) null); in test_with_Year_null() [all …]
|
D | TCKLocalDateTime.java | 122 import java.time.Year; 250 check(LocalDateTime.MIN, Year.MIN_VALUE, 1, 1, 0, 0, 0, 0); in constant_MIN() 255 check(LocalDateTime.MAX, Year.MAX_VALUE, 12, 31, 23, 59, 59, 999999999); in constant_MAX() 766 … {OffsetDateTime.of(LocalDateTime.of(Year.MIN_VALUE, 1, 1, 0, 0), ZoneOffset.UTC).toInstant(), 768 …{OffsetDateTime.of(LocalDateTime.of(Year.MAX_VALUE, 12, 31, 23, 59, 59, 999_999_999), ZoneOffset.U… 1200 TEST_2007_07_15_12_30_40_987654321.withYear(Year.MIN_VALUE - 1); 1396 LocalDateTime.of(Year.MAX_VALUE, 1, 1, 0, 0).plus(period); 1402 LocalDateTime.of(Year.MIN_VALUE, 1, 1, 0, 0).plus(period); 1432 LocalDateTime.of(Year.MAX_VALUE, 1, 1, 0, 0).plus(1, ChronoUnit.YEARS); 1437 LocalDateTime.of(Year.MIN_VALUE, 1, 1, 0, 0).plus(-1, ChronoUnit.YEARS); [all …]
|
D | TCKZonedDateTime.java | 115 import java.time.Year; 504 int year = Year.MIN_VALUE; 508 assertEquals(test.getYear(), Year.MIN_VALUE); 521 int year = Year.MIN_VALUE; 525 assertEquals(test.getYear(), Year.MIN_VALUE); 538 int year = Year.MAX_VALUE; 542 assertEquals(test.getYear(), Year.MAX_VALUE); 555 int year = Year.MAX_VALUE; 559 assertEquals(test.getYear(), Year.MAX_VALUE); 585 long year = Year.MAX_VALUE + 1L; [all …]
|
D | TCKOffsetDateTime.java | 121 import java.time.Year; 229 check(OffsetDateTime.MIN, Year.MIN_VALUE, 1, 1, 0, 0, 0, 0, ZoneOffset.MAX); in constant_MIN() 234 check(OffsetDateTime.MAX, Year.MAX_VALUE, 12, 31, 23, 59, 59, 999999999, ZoneOffset.MIN); in constant_MAX() 1407 OffsetDateTime a = OffsetDateTime.of(Year.MAX_VALUE, 12, 31, 23, 59, 0, 0, OFFSET_MONE); 1408 …OffsetDateTime b = OffsetDateTime.of(Year.MAX_VALUE, 12, 31, 23, 59, 0, 0, OFFSET_MTWO); // a is … 1417 OffsetDateTime a = OffsetDateTime.of(Year.MIN_VALUE, 1, 1, 0, 0, 0, 0, OFFSET_PTWO); 1418 …OffsetDateTime b = OffsetDateTime.of(Year.MIN_VALUE, 1, 1, 0, 0, 0, 0, OFFSET_PONE); // a is befo…
|
/libcore/luni/src/test/java/libcore/java/time/ |
D | YearTest.java | 19 import java.time.Year; 35 assertFalse(Year.isLeap(1900)); in test_isLeap() 36 assertFalse(Year.isLeap(1999)); in test_isLeap() 37 assertTrue(Year.isLeap(2000)); in test_isLeap() 38 assertFalse(Year.isLeap(2001)); in test_isLeap() 39 assertFalse(Year.isLeap(2002)); in test_isLeap() 40 assertFalse(Year.isLeap(2003)); in test_isLeap() 41 assertTrue(Year.isLeap(2004)); in test_isLeap() 42 assertFalse(Year.isLeap(2005)); in test_isLeap()
|
D | YearMonthTest.java | 21 import java.time.Year; 59 …assertEquals(YearMonth.of(Year.MAX_VALUE, Month.DECEMBER), ym.with(ChronoField.PROLEPTIC_MONTH, Ye… in test_with_TemporalField_long() 60 …assertEquals(YearMonth.of(Year.MIN_VALUE, Month.JANUARY), ym.with(ChronoField.PROLEPTIC_MONTH, Yea… in test_with_TemporalField_long() 67 { ChronoField.YEAR_OF_ERA, Year.MAX_VALUE + 1 }, in test_with_TemporalField_long_invalidValue() 68 { ChronoField.YEAR, Year.MIN_VALUE - 1 }, in test_with_TemporalField_long_invalidValue() 69 { ChronoField.YEAR, Year.MAX_VALUE + 1 }, in test_with_TemporalField_long_invalidValue() 75 { ChronoField.PROLEPTIC_MONTH, Year.MAX_VALUE * 12L + 12 }, in test_with_TemporalField_long_invalidValue() 76 { ChronoField.PROLEPTIC_MONTH, Year.MIN_VALUE * 12L - 1 }, in test_with_TemporalField_long_invalidValue()
|
D | DurationTest.java | 24 import java.time.Year; 132 Year.now(), in test_addTo_subtractFrom_unsupported()
|
/libcore/ojluni/src/main/java/java/time/ |
D | Year.java | 129 public final class Year class 130 implements Temporal, TemporalAdjuster, Comparable<Year>, Serializable { 169 public static Year now() { in now() 185 public static Year now(ZoneId zone) { in now() 199 public static Year now(Clock clock) { in now() 201 return Year.of(now.getYear()); in now() 219 public static Year of(int isoYear) { in of() 221 return new Year(isoYear); in of() 243 public static Year from(TemporalAccessor temporal) { in from() 244 if (temporal instanceof Year) { in from() [all …]
|
D | Ser.java | 199 ((Year) object).writeExternal(out); in writeInternal() 266 case YEAR_TYPE: return Year.readExternal(in); in readInternal()
|
D | LocalDate.java | 138 public static final LocalDate MIN = LocalDate.of(Year.MIN_VALUE, 1, 1); 143 public static final LocalDate MAX = LocalDate.of(Year.MAX_VALUE, 12, 31); 577 … return (getYear() <= 0 ? ValueRange.of(1, Year.MAX_VALUE + 1) : ValueRange.of(1, Year.MAX_VALUE)); in range()
|
D | YearMonth.java | 418 … return (getYear() <= 0 ? ValueRange.of(1, Year.MAX_VALUE + 1) : ValueRange.of(1, Year.MAX_VALUE)); in range()
|
/libcore/ojluni/src/test/java/time/tck/java/time/serial/ |
D | TCKYearSerialization.java | 67 import java.time.Year; 78 assertSerializable(Year.of(2)); in test_serialization() 79 assertSerializable(Year.of(0)); in test_serialization() 80 assertSerializable(Year.of(-2)); in test_serialization() 91 assertSerializedBySer(Year.of(2012), bytes); in test_serialization_format() 96 assertNotSerializable(Year.class); in test_invalid_serialform()
|
/libcore/luni/src/test/java/libcore/java/time/chrono/ |
D | IsoChronologyTest.java | 23 import java.time.Year; 51 { Year.MAX_VALUE, 365, Year.MAX_VALUE, 12, 31 }, in test_dateYear() 52 { Year.MIN_VALUE, 365, -Year.MIN_VALUE + 1, 12, 31 }, in test_dateYear() 70 { Year.MAX_VALUE + 1, 1 }, in test_dateYear_invalidValues() 71 { Year.MIN_VALUE - 1, 1 }, in test_dateYear_invalidValues()
|
/libcore/ojluni/src/test/java/time/test/java/time/ |
D | TestOffsetDateTime_instants.java | 70 import java.time.Year; 127 doTest_factory_ofInstant_all(Year.MIN_VALUE, Year.MIN_VALUE + 420); in factory_ofInstant_minYear() 133 int year = Year.MIN_VALUE - 1; in factory_ofInstant_tooLow() 140 doTest_factory_ofInstant_all(Year.MAX_VALUE - 420, Year.MAX_VALUE); in factory_ofInstant_maxYear() 146 long year = Year.MAX_VALUE + 1L; in factory_ofInstant_tooBig() 155 int year = Year.MIN_VALUE; in factory_ofInstant_minWithMinOffset() 159 assertEquals(test.getYear(), Year.MIN_VALUE); in factory_ofInstant_minWithMinOffset() 171 int year = Year.MIN_VALUE; in factory_ofInstant_minWithMaxOffset() 175 assertEquals(test.getYear(), Year.MIN_VALUE); in factory_ofInstant_minWithMaxOffset() 187 int year = Year.MAX_VALUE; in factory_ofInstant_maxWithMinOffset() [all …]
|
D | TestYear.java | 62 import java.time.Year; 74 assertImmutable(Year.class); in test_immutable()
|
/libcore/ojluni/src/main/java/java/time/temporal/ |
D | ChronoField.java | 63 import java.time.Year; 422 …OCH_DAY("EpochDay", DAYS, FOREVER, ValueRange.of((long) (Year.MIN_VALUE * 365.25), (long) (Year.MA… 485 …PROLEPTIC_MONTH("ProlepticMonth", MONTHS, FOREVER, ValueRange.of(Year.MIN_VALUE * 12L, Year.MAX_VA… 520 YEAR_OF_ERA("YearOfEra", YEARS, FOREVER, ValueRange.of(1, Year.MAX_VALUE, Year.MAX_VALUE + 1)), 544 YEAR("Year", YEARS, FOREVER, ValueRange.of(Year.MIN_VALUE, Year.MAX_VALUE), "year"),
|
/libcore/ojluni/src/test/java/time/tck/java/time/zone/serial/ |
D | TCKZoneOffsetTransitionSerialization.java | 69 import java.time.Year; 85 LocalDateTime ldt = LocalDateTime.of(Year.MAX_VALUE, 12, 31, 1, 31, 53); in test_serialization_unusual1() 92 LocalDateTime ldt = LocalDateTime.of(Year.MIN_VALUE, 1, 1, 12, 1, 3); in test_serialization_unusual2()
|
/libcore/ojluni/src/test/java/time/test/java/time/temporal/ |
D | TestIsoWeekFields.java | 34 import java.time.Year; 126 assertEquals(yearField.range(), ValueRange.of(Year.MIN_VALUE, Year.MAX_VALUE)); in test_WBY_range() 131 …arField.rangeRefinedBy(LocalDate.of(2012, 12, 31)), ValueRange.of(Year.MIN_VALUE, Year.MAX_VALUE)); in test_WBY_rangeRefinedBy()
|
/libcore/ojluni/src/main/java/java/time/chrono/ |
D | JapaneseChronology.java | 75 import java.time.Year; 361 if (gregorianYear >= Year.MIN_VALUE && gregorianYear <= Year.MAX_VALUE) { in prolepticYear() 413 Year.MAX_VALUE - startYear); in range() 423 return ValueRange.of(JapaneseDate.MEIJI_6_ISODATE.getYear(), Year.MAX_VALUE); in range()
|
D | IsoChronology.java | 81 import java.time.Year; 556 dom = Math.min(dom, Month.FEBRUARY.length(Year.isLeap(y))); in resolveYMD()
|
/libcore/ojluni/src/test/java/time/tck/java/time/chrono/ |
D | CopticDate.java | 71 import java.time.Year; 201 … ValueRange.of(1, Year.MAX_VALUE + 1) : ValueRange.of(1, Year.MAX_VALUE)); // TODO in range()
|
/libcore/ojluni/src/test/java/time/test/java/time/format/ |
D | TestDateTimeFormatter.java | 77 import java.time.Year; 129 assertGoodErrorTime(Year::from, "Year"); in test_parse_errorMessage()
|
/libcore/ojluni/src/test/java/time/test/java/time/chrono/ |
D | TestJapaneseChronology.java | 115 { JapaneseEra.of(3), Year.MAX_VALUE, 12, 31 }, in invalidDatesData() 137 { JapaneseEra.of(3), Year.MAX_VALUE }, in invalidEraYearData()
|