Lines Matching defs:year

56  * #setStartYear setStartYear} method can specify the year when the daylight
357 * Sets the daylight saving time starting year.
359 * @param year The daylight saving starting year.
361 public void setStartYear(int year)
363 startYear = year;
561 // Get the year in local time
563 int year = cdate.getNormalizedYear();
564 if (year >= startYear) {
567 offset = getOffset(cal, cdate, year, date);
593 * @param year The year in the given date.
604 public int getOffset(int era, int year, int month, int day, int dayOfWeek,
611 int y = year;
613 // adjust y with the GregorianCalendar-style year numbering.
617 // If the year isn't representable with the 64-bit long
618 // integer in milliseconds, convert the year to an
619 // equivalent year. This is required to pass some JCK test cases
625 // y %= 28 also produces an equivalent year, but positive
626 // year numbers would be convenient to use the UNIX cal
631 // convert year to its 1-based month value
644 // normalized year numbering is ..., -2 (BCE 2), -1 (BCE 1),
646 // style year numbering (..., -1, 0 (BCE 1), 1, 2, ...).
665 if (!useDaylight || year < startYear || era != GregorianCalendar.CE) {
672 private int getOffset(BaseCalendar cal, BaseCalendar.Date cdate, int year, long time) {
678 if (year == cacheYear) {
684 long start = getStart(cal, cdate, year);
685 long end = getEnd(cal, cdate, year);
692 cacheYear = year;
698 // TODO: support Gregorian cutover. The previous year
700 start = getStart(cal, cdate, year - 1);
705 // TODO: support Gregorian cutover. The next year
707 end = getEnd(cal, cdate, year + 1);
724 private long getStart(BaseCalendar cal, BaseCalendar.Date cdate, int year) {
729 return getTransition(cal, cdate, startMode, year, startMonth, startDay,
733 private long getEnd(BaseCalendar cal, BaseCalendar.Date cdate, int year) {
741 return getTransition(cal, cdate, endMode, year, endMonth, endDay,
746 int mode, int year, int month, int dayOfMonth,
748 cdate.setNormalizedYear(year);
1092 * The year in which daylight saving time is first observed. This is an {@link GregorianCalendar#AD AD}
1207 * cacheYear has a year value if both cacheStart and cacheEnd are
1208 * in the same year. cacheYear is set to startYear - 1 if