Lines Matching full:year
35 * in year of cutover.
36 * 01/24/2000 aliu Revised computeJulianDay for YEAR YEAR_WOY WOY.
61 = {0,31,59,90,120,151,181,212,243,273,304,334}; // 0-based, for day-in-year
63 = {0,31,60,91,121,152,182,213,244,274,305,335}; // 0-based, for day-in-year
70 // This would seem to limit the year range to:
74 // range limit on the year field is smaller (~ +/-140000). [alan 3.0]
80 { 1, 1, 140742, 144683}, // YEAR
110 * YEAR 1 1 140742 144683
220 GregorianCalendar::GregorianCalendar(int32_t year, int32_t month, int32_t date,
228 set(UCAL_YEAR, year);
235 GregorianCalendar::GregorianCalendar(int32_t year, int32_t month, int32_t date,
243 set(UCAL_YEAR, year);
252 GregorianCalendar::GregorianCalendar(int32_t year, int32_t month, int32_t date,
261 set(UCAL_YEAR, year);
329 // midnight at or before the cutover, and the cutover year. The
347 // Normalize the year so BC values are represented as 0 and negative
400 // consistent 4-year cycles throughout time.
424 // [j81] if we are after the cutover in its year, shift the day of the year
460 GregorianCalendar::isLeapYear(int32_t year) const
463 // NOTE: year&0x3 == year%4
464 return (year >= fGregorianCutoverYear ?
465 (((year&0x3) == 0) && ((year%100 != 0) || (year%400 == 0))) : // Gregorian
466 ((year&0x3) == 0)); // Julian
485 // The following check handles portions of the cutover year BEFORE the
536 // modify the extended year value accordingly.
579 // modify the extended year value accordingly.
595 int32_t year = internalGet(UCAL_EXTENDED_YEAR);
596 return handleGetMonthLength(year, month);
602 GregorianCalendar::monthLength(int32_t month, int32_t year) const
604 return isLeapYear(year) ? kLeapMonthLength[month] : kMonthLength[month];
610 GregorianCalendar::yearLength(int32_t year) const
612 return isLeapYear(year) ? 366 : 365;
626 * After adjustments such as add(MONTH), add(YEAR), we don't want the
710 * January 1, year 1 of the given calendar. If julianDay == 0, it
715 int32_t year, UBool& isLeap)
717 isLeap = year%4 == 0;
718 int32_t y = year - 1;
722 isLeap = isLeap && ((year%100 != 0) || (year%400 == 0));
724 julianDay += Grego::gregorianShift(year);
760 // * of the day BEFORE January 1 of a year (a return value from
764 // // Compute DOY from day of week plus week of year
766 // // Find the day of the week for the first of this year. This
768 // // the week. Add 1 to get first day of year.
834 // Common code - see if we're in the cutover month of the cutover year
861 year can have seemingly
862 // strange effects simply because the year of the week of year
863 // may be different from the calendar year. For example, the
868 // Get the ISO year, which matches the week of year. This
869 // may be one year before or after the calendar year.
884 // Determine the last week of the ISO year.
887 // days at the end of the year are going to fall into
888 // week 1 of the next year, we drop the last week by
889 // subtracting 7 from the last day of the year.
1077 * Old year limits were least max 292269054, max 292278994.
1098 * representable range (except for the code that handles the YEAR
1100 * odd spots in the year. For calendars with the default Gregorian
1105 * 31 in that year, the actual maximum month might be Jul, whereas is
1113 * the year. - Liu 11/6/00 */
1118 /* The year computation is no different, in principle, from the
1124 * The actual maxima for YEAR depend on the type of calendar:
1131 * time, or era changes in response to setting the year. We don't
1132 * check for month, date, and time here because the year and era are
1133 * sufficient to detect an invalid year setting. NOTE: If code is
1135 * Feb 29 must be allowed to shift to Mar 1 when setting the year.
1151 * valid year, and highBad is an out of range year.
1177 // the year to return
1178 int32_t year = kEpochYear;
1180 // year field to use
1184 // derive the proper year. Use the one most recently set.
1190 // based on the "best" year field, get the year
1193 year = internalGet(UCAL_EXTENDED_YEAR, kEpochYear);
1198 // The year defaults to the epoch start, the era to AD
1201 year = 1 - internalGet(UCAL_YEAR, 1); // Convert to extended year
1203 year = internalGet(UCAL_YEAR, kEpochYear);
1209 year = handleGetExtendedYearFromWeekFields(internalGet(UCAL_YEAR_WOY), internalGet(UCAL_WEEK_OF_YEAR));
1211 // if(internalGet(UCAL_YEAR_WOY) != year) {
1213 __FILE__, __LINE__,internalGet(UCAL_YEAR_WOY),internalGet(UCAL_WEEK_OF_YEAR),year);
1219 year = kEpochYear;
1221 return year;
1226 // convert year to extended form