/libcore/luni/src/test/java/libcore/java/time/ |
YearTest.java | 19 import java.time.Year; 25 * Additional tests for {@link Year}. 33 // More extensive tests for Year.isLeap() (which delegates to this static method) can be 35 assertFalse(Year.isLeap(1900)); 36 assertFalse(Year.isLeap(1999)); 37 assertTrue(Year.isLeap(2000)); 38 assertFalse(Year.isLeap(2001)); 39 assertFalse(Year.isLeap(2002)); 40 assertFalse(Year.isLeap(2003)); 41 assertTrue(Year.isLeap(2004)) [all...] |
YearMonthTest.java | 21 import java.time.Year; 45 assertEquals(YearMonth.of(1000, Month.JANUARY), ym.with(ChronoField.YEAR, 1000)); 46 assertEquals(YearMonth.of(-1, Month.JANUARY), ym.with(ChronoField.YEAR, -1)); 56 // Proleptic year 0 is 1 BCE. 59 assertEquals(YearMonth.of(Year.MAX_VALUE, Month.DECEMBER), ym.with(ChronoField.PROLEPTIC_MONTH, Year.MAX_VALUE * 12L + 11)); 60 assertEquals(YearMonth.of(Year.MIN_VALUE, Month.JANUARY), ym.with(ChronoField.PROLEPTIC_MONTH, Year.MIN_VALUE * 12L)); 67 { ChronoField.YEAR_OF_ERA, Year.MAX_VALUE + 1 }, 68 { ChronoField.YEAR, Year.MIN_VALUE - 1 } [all...] |
/libcore/ojluni/src/test/java/time/tck/java/time/ |
TCKYear.java | 63 import static java.time.temporal.ChronoField.YEAR; 87 import java.time.Year; 115 * Test Year. 120 private static final Year TEST_2008 = Year.of(2008); 137 YEAR, 158 Year expected = Year.now(Clock.systemDefaultZone()); 159 Year test = Year.now() 267 Year year = Year.parse(text); local [all...] |
TCKLocalDate.java | 73 import static java.time.temporal.ChronoField.YEAR; 102 import java.time.Year; 187 YEAR, 218 check(LocalDate.MIN, Year.MIN_VALUE, 1, 1); 223 check(LocalDate.MAX, Year.MAX_VALUE, 12, 31); 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)); 635 assertEquals(TEST_2007_07_15.isSupported(ChronoField.YEAR), true); 672 assertEquals(test.get(YEAR), 2008); 684 assertEquals(test.getLong(YEAR), 2008) [all...] |
TCKYearMonth.java | 65 import static java.time.temporal.ChronoField.YEAR; 90 import java.time.Year; 146 YEAR, 234 YearMonth.of(Year.MIN_VALUE - 1, Month.JANUARY); 239 YearMonth.of(Year.MAX_VALUE + 1, Month.JANUARY); 256 YearMonth.of(Year.MIN_VALUE - 1, 2); 261 YearMonth.of(Year.MAX_VALUE + 1, 2); 318 {"+" + Year.MAX_VALUE + "-03", YearMonth.of(Year.MAX_VALUE, 3)}, 319 {Year.MIN_VALUE + "-03", YearMonth.of(Year.MIN_VALUE, 3)} [all...] |
/libcore/ojluni/src/test/java/time/test/java/time/ |
TestYear.java | 62 import java.time.Year; 67 * Test Year. 74 assertImmutable(Year.class);
|
TestOffsetDateTime_instants.java | 70 import java.time.Year; 127 doTest_factory_ofInstant_all(Year.MIN_VALUE, Year.MIN_VALUE + 420); 133 int year = Year.MIN_VALUE - 1; local 134 long days = (year * 365L + (year / 4 - year / 100 + year / 400)) - days_0000_to_1970; 140 doTest_factory_ofInstant_all(Year.MAX_VALUE - 420, Year.MAX_VALUE) 146 long year = Year.MAX_VALUE + 1L; local 155 int year = Year.MIN_VALUE; local 171 int year = Year.MIN_VALUE; local 187 int year = Year.MAX_VALUE; local 203 int year = Year.MAX_VALUE; local [all...] |
/libcore/ojluni/src/test/java/time/tck/java/time/serial/ |
TCKYearSerialization.java | 67 import java.time.Year; 70 * Test Year serialization. 78 assertSerializable(Year.of(2)); 79 assertSerializable(Year.of(0)); 80 assertSerializable(Year.of(-2)); 91 assertSerializedBySer(Year.of(2012), bytes); 96 assertNotSerializable(Year.class);
|
/device/linaro/bootloader/edk2/CryptoPkg/Library/BaseCryptLib/SysCall/ |
TimerWrapper.c | 32 // The value at index 13 is for the whole year.
76 UINTN Year;
85 // UTime should now be set to 00:00:00 on Jan 1 of the current year.
87 for (Year = 1970, *timer = 0; Year != Time.Year; Year++) {
88 *timer = *timer + (time_t)(CumulativeDays[IsLeap(Year)][13] * SECSPERDAY);
96 (time_t)(CumulativeDays[IsLeap(Time.Year)][Time.Month] * SECSPERDAY) +
113 time_t Year;
[all...] |
/libcore/ojluni/src/main/java/java/time/ |
Year.java | 65 import static java.time.temporal.ChronoField.YEAR; 101 * A year in the ISO-8601 calendar system, such as {@code 2007}. 103 * {@code Year} is an immutable date-time object that represents a year. 104 * Any field that can be derived from a year can be obtained. 112 * For example, the value "2007" can be stored in a {@code Year}. 115 * the proleptic numbering system. Year 1 is preceded by year 0, then by year -1. 129 public final class Year 155 private final int year; field in class:Year [all...] |
/libcore/luni/src/test/java/libcore/java/time/chrono/ |
IsoChronologyTest.java | 23 import java.time.Year; 44 // proleptic Year, dayOfYear, expectedYear, expectedMonth, expectedDayOfMonth 51 { Year.MAX_VALUE, 365, Year.MAX_VALUE, 12, 31 }, 52 { Year.MIN_VALUE, 365, -Year.MIN_VALUE + 1, 12, 31 }, 70 { Year.MAX_VALUE + 1, 1 }, 71 { Year.MIN_VALUE - 1, 1 }, 101 .of(/* year */ 2017, /* month */ 4, /* dayOfMonth */ 1,
|
/device/linaro/bootloader/edk2/EmulatorPkg/RealTimeClockRuntimeDxe/ |
RealTimeClock.c | 251 if (Time->Year < 1998 ||
252 Time->Year > 2099 ||
292 if (Time->Year % 4 == 0) {
293 if (Time->Year % 100 == 0) {
294 if (Time->Year % 400 == 0) {
|
/device/linaro/bootloader/edk2/EmbeddedPkg/Library/HalRuntimeServicesExampleLib/ |
Rtc.c | 138 if (Time->Year % 4 == 0) {
139 if (Time->Year % 100 == 0) {
140 if (Time->Year % 400 == 0) {
230 *Century = DecimaltoBcd ((UINT8) (Time->Year / 100));
232 Time->Year = (UINT16) (Time->Year % 100);
235 Time->Year = DecimaltoBcd ((UINT8) Time->Year);
263 if ((Time->Year < 1998 ) ||
264 (Time->Year > 2099 ) || [all...] |
/bionic/libc/bionic/ |
time64.c | 76 typedef int64_t Year; 107 static const Year years_in_gregorian_cycle = 400; 111 /* Year range we can trust the time funcitons with */ 115 /* 28 year Julian calendar cycle */ 118 /* Year cycle from MAX_SAFE_YEAR down. */ 129 /* Year cycle from MIN_SAFE_YEAR up */ 183 static int is_exception_century(Year year) 185 int is_exception = ((year % 100 == 0) && !(year % 400 == 0)) 199 Year year; local 490 Year year = input_date->tm_year + 1900; local 523 Year year = 70; local [all...] |
/device/linaro/bootloader/edk2/Vlv2TbltDevicePkg/PlatformDxe/ |
Rtc.c | 53 See if YEAR field of a variable of EFI_TIME type is correct.
70 if ((Time->Year) < YearBuilt) {
133 // Year
145 EfiTime.Year = (UINT16)(CharToUint(mBiosReleaseDate[8])*10 + CharToUint(mBiosReleaseDate[9]) + 2000);
150 DEBUG ((EFI_D_INFO, "Day:%d Month:%d Year:%d \n", (UINT32)EfiTime.Day, (UINT32)EfiTime.Month, (UINT32)EfiTime.Year));
|
/libcore/ojluni/src/test/java/time/tck/java/time/zone/serial/ |
TCKZoneOffsetTransitionSerialization.java | 69 import java.time.Year; 85 LocalDateTime ldt = LocalDateTime.of(Year.MAX_VALUE, 12, 31, 1, 31, 53); 92 LocalDateTime ldt = LocalDateTime.of(Year.MIN_VALUE, 1, 1, 12, 1, 3);
|
/libcore/ojluni/src/main/java/java/time/temporal/ |
ChronoField.java | 63 import java.time.Year; 91 * For example, most non-ISO calendar systems define dates as a year, month and day, 365 * The aligned day-of-week within a year. 368 * where the weeks are aligned to the start of the year. 371 * For example, in a calendar systems with a seven day week, the first aligned-week-of-year 372 * starts on day-of-year 1, the second aligned-week starts on day-of-year 8, and so on. 375 * As such, day-of-year 1 to 7 will have aligned-day-of-week values from 1 to 7. 376 * And day-of-year 8 to 14 will repeat this with aligned-day-of-week values from 1 to 7. 388 * from 1 to 28, or 29 in a leap year [all...] |