/libcore/ojluni/src/test/java/time/tck/java/time/chrono/ |
D | TCKHijrahChronology.java | 149 public void test_badDates(int year, int month, int dom) { in test_badDates() argument 150 HijrahChronology.INSTANCE.date(year, month, dom); in test_badDates() 156 int year = 1435; in test_ofYearDayTooLarge() local 157 int lengthOfYear = HijrahChronology.INSTANCE.dateYearDay(year, 1).lengthOfYear(); in test_ofYearDayTooLarge() 158 HijrahDate hd = HijrahChronology.INSTANCE.dateYearDay(year, lengthOfYear + 1); in test_ofYearDayTooLarge() 192 int year = HijrahChronology.INSTANCE.prolepticYear(era, 1); in test_InvalidEras() local 295 final int year = 1434; in data_resolve_ymd() local 296 final int yearP1 = year + 1; in data_resolve_ymd() 297 final int yearP2 = year + 2; in data_resolve_ymd() 298 final int yearM1 = year - 1; in data_resolve_ymd() [all …]
|
/libcore/ojluni/src/main/java/sun/util/calendar/ |
D | BaseCalendar.java | 168 protected final boolean hit(int year) { in hit() argument 169 return year == cachedYear; in hit() 184 protected void setCache(int year, long jan1, int len) { in setCache() argument 185 cachedYear = year; in setCache() 274 int year = bdate.getNormalizedYear(); in normalizeMonth() local 278 year -= (int)((xm / 12) + 1); in normalizeMonth() 280 bdate.setNormalizedYear(year); in normalizeMonth() 283 year += (int)((month - 1) / 12); in normalizeMonth() 285 bdate.setNormalizedYear(year); in normalizeMonth() 331 private int getMonthLength(int year, int month) { in getMonthLength() argument [all …]
|
D | JulianCalendar.java | 84 public void setNormalizedYear(int year) { in setNormalizedYear() argument 85 if (year <= 0) { in setNormalizedYear() 86 setYear(1 - year); in setNormalizedYear() 89 setYear(year); in setNormalizedYear() 188 int year; in getCalendarDateFromFixedDate() local 190 year = (int)(fd / 1461); in getCalendarDateFromFixedDate() 192 year = (int) CalendarUtils.floorDivide(fd, 1461); in getCalendarDateFromFixedDate() 194 int priorDays = (int)(fixedDate - getFixedDate(year, JANUARY, 1, jdate)); in getCalendarDateFromFixedDate() 195 boolean isLeap = CalendarUtils.isJulianLeapYear(year); in getCalendarDateFromFixedDate() 196 if (fixedDate >= getFixedDate(year, MARCH, 1, jdate)) { in getCalendarDateFromFixedDate() [all …]
|
D | CalendarDate.java | 68 private int year; field in CalendarDate 123 return year; in getYear() 126 public CalendarDate setYear(int year) { in setYear() argument 127 if (this.year != year) { in setYear() 128 this.year = year; in setYear() 136 year += n; in addYear() 305 public CalendarDate setDate(int year, int month, int dayOfMonth) { in setDate() argument 306 setYear(year); in setDate() 312 public CalendarDate addDate(int year, int month, int dayOfMonth) { in addDate() argument 313 addYear(year); in addDate() [all …]
|
D | LocalGregorianCalendar.java | 96 void setLocalYear(int year) { in setLocalYear() argument 97 super.setYear(year); in setLocalYear() 294 int year = ldate.getNormalizedYear(); in normalize() local 302 if (year > sinceYear) { in normalize() 305 if (year == sinceYear) { in normalize() 347 ldate.setLocalYear(year); in normalize() 348 ldate.setNormalizedYear(year); in normalize() 381 public boolean isLeapYear(Era era, int year) { in isLeapYear() argument 383 return isLeapYear(year); in isLeapYear() 385 int gyear = era.getSinceDate().getYear() + year - 1; in isLeapYear()
|
/libcore/ojluni/src/main/java/java/time/ |
D | Year.java | 155 private final int year; field in Year 309 public static boolean isLeap(long year) { in isLeap() argument 310 return ((year & 3) == 0) && ((year % 100) != 0 || (year % 400) == 0); in isLeap() 319 private Year(int year) { in Year() argument 320 this.year = year; in Year() 332 return year; in getValue() 430 return (year <= 0 ? ValueRange.of(1, MAX_VALUE + 1) : ValueRange.of(1, MAX_VALUE)); in range() 493 case YEAR_OF_ERA: return (year < 1 ? 1 - year : year); in getLong() 494 case YEAR: return year; in getLong() 495 case ERA: return (year < 1 ? 0 : 1); in getLong() [all …]
|
D | YearMonth.java | 144 private final int year; field in YearMonth 206 public static YearMonth of(int year, Month month) { in of() argument 208 return of(year, month.getValue()); in of() 219 public static YearMonth of(int year, int month) { in of() argument 220 YEAR.checkValidValue(year); in of() 222 return new YearMonth(year, month); in of() 299 private YearMonth(int year, int month) { in YearMonth() argument 300 this.year = year; in YearMonth() 313 if (year == newYear && month == newMonth) { in with() 484 case YEAR_OF_ERA: return (year < 1 ? 1 - year : year); in getLong() [all …]
|
D | LocalDate.java | 163 private final int year; field in LocalDate 239 public static LocalDate of(int year, Month month, int dayOfMonth) { in of() argument 240 YEAR.checkValidValue(year); in of() 243 return create(year, month.getValue(), dayOfMonth); in of() 259 public static LocalDate of(int year, int month, int dayOfMonth) { in of() argument 260 YEAR.checkValidValue(year); in of() 263 return create(year, month, dayOfMonth); in of() 279 public static LocalDate ofYearDay(int year, int dayOfYear) { in ofYearDay() argument 280 YEAR.checkValidValue(year); in ofYearDay() 282 boolean leap = IsoChronology.INSTANCE.isLeapYear(year); in ofYearDay() [all …]
|
/libcore/ojluni/src/test/java/time/test/java/time/ |
D | TestOffsetDateTime_instants.java | 133 int year = Year.MIN_VALUE - 1; in factory_ofInstant_tooLow() local 134 long days = (year * 365L + (year / 4 - year / 100 + year / 400)) - days_0000_to_1970; in factory_ofInstant_tooLow() 146 long year = Year.MAX_VALUE + 1L; in factory_ofInstant_tooBig() local 147 long days = (year * 365L + (year / 4 - year / 100 + year / 400)) - days_0000_to_1970; in factory_ofInstant_tooBig() 155 int year = Year.MIN_VALUE; in factory_ofInstant_minWithMinOffset() local 156 long days = (year * 365L + (year / 4 - year / 100 + year / 400)) - days_0000_to_1970; in factory_ofInstant_minWithMinOffset() 171 int year = Year.MIN_VALUE; in factory_ofInstant_minWithMaxOffset() local 172 long days = (year * 365L + (year / 4 - year / 100 + year / 400)) - days_0000_to_1970; in factory_ofInstant_minWithMaxOffset() 187 int year = Year.MAX_VALUE; in factory_ofInstant_maxWithMinOffset() local 188 long days = (year * 365L + (year / 4 - year / 100 + year / 400)) + 365 - days_0000_to_1970; in factory_ofInstant_maxWithMinOffset() [all …]
|
D | AbstractTest.java | 75 protected static boolean isIsoLeap(long year) { in isIsoLeap() argument 76 if (year % 4 != 0) { in isIsoLeap() 79 if (year % 100 == 0 && year % 400 != 0) { in isIsoLeap()
|
/libcore/ojluni/src/main/java/java/util/ |
D | GregorianCalendar.java | 640 public GregorianCalendar(int year, int month, int dayOfMonth) { in GregorianCalendar() argument 641 this(year, month, dayOfMonth, 0, 0, 0, 0); in GregorianCalendar() 657 public GregorianCalendar(int year, int month, int dayOfMonth, int hourOfDay, in GregorianCalendar() argument 659 this(year, month, dayOfMonth, hourOfDay, minute, 0, 0); in GregorianCalendar() 677 public GregorianCalendar(int year, int month, int dayOfMonth, int hourOfDay, in GregorianCalendar() argument 679 this(year, month, dayOfMonth, hourOfDay, minute, second, 0); in GregorianCalendar() 698 GregorianCalendar(int year, int month, int dayOfMonth, in GregorianCalendar() argument 702 this.set(YEAR, year); in GregorianCalendar() 827 public boolean isLeapYear(int year) { in isLeapYear() argument 828 if ((year & 3) != 0) { in isLeapYear() [all …]
|
D | Date.java | 196 public Date(int year, int month, int date) { in Date() argument 197 this(year, month, date, 0, 0, 0); in Date() 219 public Date(int year, int month, int date, int hrs, int min) { in Date() argument 220 this(year, month, date, hrs, min, 0); in Date() 243 public Date(int year, int month, int date, int hrs, int min, int sec) { in Date() argument 244 int y = year + 1900; in Date() 317 public static long UTC(int year, int month, int date, in UTC() argument 319 int y = year + 1900; in UTC() 455 int year = Integer.MIN_VALUE; in parse() local 496 if (prevc == '+' || prevc == '-' && year != Integer.MIN_VALUE) { in parse() [all …]
|
D | SimpleTimeZone.java | 361 public void setStartYear(int year) in setStartYear() argument 363 startYear = year; in setStartYear() 563 int year = cdate.getNormalizedYear(); in getOffsets() local 564 if (year >= startYear) { in getOffsets() 567 offset = getOffset(cal, cdate, year, date); in getOffsets() 604 public int getOffset(int era, int year, int month, int day, int dayOfWeek, in getOffset() argument 611 int y = year; in getOffset() 665 if (!useDaylight || year < startYear || era != GregorianCalendar.CE) { in getOffset() 672 private int getOffset(BaseCalendar cal, BaseCalendar.Date cdate, int year, long time) { in getOffset() argument 678 if (year == cacheYear) { in getOffset() [all …]
|
/libcore/ojluni/src/main/java/java/sql/ |
D | Date.java | 57 public Date(int year, int month, int day) { in Date() argument 58 super(year, month, day); in Date() 133 int year = Integer.parseInt(yyyy); in valueOf() local 138 d = new Date(year - 1900, month - 1, day); in valueOf() 157 int year = super.getYear() + 1900; in toString() local 162 buf[0] = Character.forDigit(year/1000,10); in toString() 163 buf[1] = Character.forDigit((year/100)%10,10); in toString() 164 buf[2] = Character.forDigit((year/10)%10,10); in toString() 165 buf[3] = Character.forDigit(year%10,10); in toString()
|
D | Timestamp.java | 87 public Timestamp(int year, int month, int date, in Timestamp() argument 89 super(year, month, date, hour, minute, second); in Timestamp() 175 int year = 0; in valueOf() local 225 year = Integer.parseInt(yyyy); in valueOf() 263 return new Timestamp(year - 1900, month - 1, day, hour, minute, second, a_nanos); in valueOf() 276 int year = super.getYear() + 1900; in toString() local 293 if (year < 1000) { in toString() 295 yearString = "" + year; in toString() 299 yearString = "" + year; in toString()
|
/libcore/ojluni/src/main/java/java/nio/file/attribute/ |
D | FileTime.java | 422 int year = 0; in toString() local 429 year = ldt.getYear() + (int)hi * 10000; in toString() 436 year = ldt.getYear() + (int)hi * 10000; in toString() 438 if (year <= 0) { in toString() 439 year = year - 1; in toString() 443 sb.append(year < 0 ? "-" : ""); in toString() 444 year = Math.abs(year); in toString() 445 if (year < 10000) { in toString() 446 append(sb, 1000, Math.abs(year)); in toString() 448 sb.append(String.valueOf(year)); in toString()
|
/libcore/ojluni/src/main/java/sun/security/util/ |
D | DerInputBuffer.java | 313 int year, month, day, hour, minute, second, millis; in getTime() local 318 year = 1000 * Character.digit((char)buf[pos++], 10); in getTime() 319 year += 100 * Character.digit((char)buf[pos++], 10); in getTime() 320 year += 10 * Character.digit((char)buf[pos++], 10); in getTime() 321 year += Character.digit((char)buf[pos++], 10); in getTime() 325 year = 10 * Character.digit((char)buf[pos++], 10); in getTime() 326 year += Character.digit((char)buf[pos++], 10); in getTime() 328 if (year < 50) // origin 2000 in getTime() 329 year += 2000; in getTime() 331 year += 1900; // origin 1900 in getTime() [all …]
|
/libcore/ojluni/src/main/java/java/time/chrono/ |
D | HijrahChronology.java | 649 int year = epochMonthToYear(epochMonth); in getHijrahDateInfo() local 655 dateInfo[0] = year; in getHijrahDateInfo() 808 private int yearToEpochMonth(int year) { in yearToEpochMonth() argument 809 return (year * 12) - hijrahStartEpochMonth; in yearToEpochMonth() 930 int year = Integer.valueOf(key); in loadCalendarData() local 932 years.put(year, months); in loadCalendarData() 933 maxYear = Math.max(maxYear, year); in loadCalendarData() 934 minYear = Math.min(minYear, year); in loadCalendarData() 961 for (int year = minYear; year < maxYear; year++) { in loadCalendarData() 962 int length = getYearLength(year); in loadCalendarData() [all …]
|
D | JapaneseDate.java | 341 JapaneseDate(JapaneseEra era, int year, LocalDate isoDate) { in JapaneseDate() argument 346 this.yearOfEra = year; in JapaneseDate() 504 int year = isoDate.getYear(); in toPrivateJapaneseDate() local 506 year -= sunEra.getSinceDate().getYear() - 1; in toPrivateJapaneseDate() 508 …jdate.setEra(sunEra).setYear(year).setMonth(isoDate.getMonthValue()).setDayOfMonth(isoDate.getDayO… in toPrivateJapaneseDate() 588 int year = JapaneseChronology.INSTANCE.prolepticYear(era, yearOfEra); in withYear() local 589 return with(isoDate.withYear(year)); in withYear() 605 private JapaneseDate withYear(int year) { in withYear() argument 606 return withYear(getEra(), year); in withYear() 752 int year = in.readInt(); in readExternal() local [all …]
|
/libcore/luni/src/main/java/javax/xml/datatype/ |
D | DatatypeFactory.java | 622 final BigInteger year, in newDurationYearMonth() argument 627 year, in newDurationYearMonth() 655 final int year, in newDurationYearMonth() argument 657 return newDuration(isPositive, year, month, in newDurationYearMonth() 789 final BigInteger year, in newXMLGregorianCalendar() argument 825 final int year, in newXMLGregorianCalendar() argument 835 …BigInteger realYear = (year != DatatypeConstants.FIELD_UNDEFINED) ? BigInteger.valueOf((long) year… in newXMLGregorianCalendar() 887 final int year, in newXMLGregorianCalendarDate() argument 893 year, in newXMLGregorianCalendarDate()
|
/libcore/ojluni/annotations/hiddenapi/sun/util/calendar/ |
D | BaseCalendar.java | 59 private int getMonthLength(int year, int month) { in getMonthLength() argument 67 final long getDayOfYear(int year, int month, int dayOfMonth) { in getDayOfYear() argument 76 int year, int month, int dayOfMonth, sun.util.calendar.BaseCalendar.Date cache) { in getFixedDate() argument 194 protected final boolean hit(int year) { in hit() argument 210 protected void setCache(int year, long jan1, int len) { in setCache() argument
|
/libcore/ojluni/src/test/java/time/tck/java/time/ |
D | TestIsoChronology.java | 179 public void test_badDates(int year, int month, int dom) { in test_badDates() argument 180 IsoChronology.INSTANCE.date(year, month, dom); in test_badDates() 185 int year = 5; in test_date_withEra() local 188 LocalDate test = IsoChronology.INSTANCE.date(IsoEra.BCE, year, month, dayOfMonth); in test_date_withEra() 190 assertEquals(test.get(ChronoField.YEAR_OF_ERA), year); in test_date_withEra() local 194 assertEquals(test.get(YEAR), 1 + (-1 * year)); in test_date_withEra() 196 assertEquals(test.get(YEAR_OF_ERA), year); in test_date_withEra() local 271 public void test_isLeapYear(int year, boolean isLeapYear) { in test_isLeapYear() argument 272 assertEquals(IsoChronology.INSTANCE.isLeapYear(year), isLeapYear); in test_isLeapYear()
|
/libcore/ojluni/src/test/java/time/test/java/time/chrono/ |
D | TestJapaneseChronoImpl.java | 133 for (int year : new int[] {6, 7}) { in test_dayOfYearVsCalendar() 134 JapaneseDate jd = JapaneseChronology.INSTANCE.dateYearDay(era, year, 1); in test_dayOfYearVsCalendar() 141 "different DAY_OF_YEAR values in " + era + ", year: " + year); in test_dayOfYearVsCalendar() local 143 "different maximum for DAY_OF_YEAR in " + era + ", year: " + year); in test_dayOfYearVsCalendar() local 145 "different minimum for DAY_OF_YEAR in " + era + ", year: " + year); in test_dayOfYearVsCalendar() local
|
/libcore/luni/src/test/java/libcore/java/util/ |
D | SimpleTimeZoneTest.java | 212 int year = cal.get(Calendar.YEAR); in findDstEntryAndExit() local 215 if (cal.get(Calendar.YEAR) != year) { in findDstEntryAndExit() 217 "Doesn't enter daylight savings time in " + year + " in " + timeZone); in findDstEntryAndExit() 228 if (cal.get(Calendar.YEAR) != year) { in findDstEntryAndExit() 230 "Doesn't exit daylight savings time in " + year + " in " + timeZone); in findDstEntryAndExit() 258 private void checkDstTransitionTimes(TimeZone timeZone, int year, in checkDstTransitionTimes() argument 263 calendar.set(year, Calendar.JANUARY, 1, 0, 0, 0); in checkDstTransitionTimes()
|
/libcore/ojluni/src/test/java/time/tck/java/time/temporal/ |
D | TCKTemporalAdjusters.java | 338 …public void test_dayOfWeekInMonth_positive(int year, int month, DayOfWeek dow, LocalDate expected)… in test_dayOfWeekInMonth_positive() argument 341 LocalDate date = date(year, month, day); in test_dayOfWeekInMonth_positive() 367 public void test_dayOfWeekInMonth_zero(int year, int month, DayOfWeek dow, LocalDate expected) { in test_dayOfWeekInMonth_zero() argument 369 LocalDate date = date(year, month, day); in test_dayOfWeekInMonth_zero() 394 …public void test_dayOfWeekInMonth_negative(int year, int month, DayOfWeek dow, LocalDate expected)… in test_dayOfWeekInMonth_negative() argument 397 LocalDate date = date(year, month, day); in test_dayOfWeekInMonth_negative() 418 public void test_firstInMonth(int year, int month, DayOfWeek dow, LocalDate expected) { in test_firstInMonth() argument 420 LocalDate date = date(year, month, day); in test_firstInMonth() 440 public void test_lastInMonth(int year, int month, DayOfWeek dow, LocalDate expected) { in test_lastInMonth() argument 442 LocalDate date = date(year, month, day); in test_lastInMonth() [all …]
|