Lines Matching refs:year
562 {/*N/A*/-1, /*N/A*/-1, /*N/A*/-1, /*N/A*/-1}, // YEAR
609 // local fields (YEAR, MONTH, DATE, HOUR, MINUTE, etc.)
631 // local fields (YEAR, MONTH, DATE, HOUR, MINUTE, etc.)
1065 Calendar::set(int32_t year, int32_t month, int32_t date)
1067 set(UCAL_YEAR, year);
1075 Calendar::set(int32_t year, int32_t month, int32_t date, int32_t hour, int32_t minute)
1077 set(UCAL_YEAR, year);
1087 Calendar::set(int32_t year, int32_t month, int32_t date, int32_t hour, int32_t minute, int32_t second)
1089 set(UCAL_YEAR, year);
1267 // EXTENDED_YEAR, YEAR, DAY_OF_YEAR. This method will call internalSet(),
1304 * Compute the Gregorian calendar year, month, and day of month from
1327 * Compute the Gregorian calendar year, month, and day of month from the
1340 * DAY_OF_WEEK_IN_MONTH, and DOW_LOCAL from EXTENDED_YEAR, YEAR,
1344 * <p>The YEAR_WOY field is computed simplistically. It is equal to YEAR
1345 * most of the time, but at the year boundary it may be adjusted to YEAR-1
1346 * or YEAR+1 to reflect the overlap of a week into an adjacent year. In
1347 * this case, a simple increment or decrement is performed on YEAR, even
1348 * though this may yield an invalid YEAR value. For instance, if the YEAR
1349 * is part of a calendar system with an N-year cycle field CYCLE, then
1350 * incrementing the YEAR may involve incrementing CYCLE and setting YEAR
1353 * fields for fields larger than or equal to a year. This additional
1356 * proleptic Gregorian calendar, which has no field larger than a year.
1367 // Compute the week of the year. For the Gregorian calendar, valid week
1368 // numbers run from 1 to 52 or 53, depending on the year, the first day
1370 // calendars, the valid range may be different -- it depends on the year
1371 // length. Days at the start of the year may fall into the last week of
1372 // the previous year; days at the end of the year may fall into the
1373 // first week of the next year. ASSUME that the year length is less than
1383 // Adjust for weeks at the year end that overlap into the previous or
1384 // next calendar year.
1386 // We are the last week of the previous year.
1389 // next year.
1396 // Fast check: For it to be week 1 of the next year, the DOY
1398 // cannot possibly be week 1 of the next year:
1431 // in question (either a year or a month). Zero represents the
1556 // Rolling the year can involve pinning the DAY_OF_MONTH.
1646 // to the whole year. Please see the comment for WEEK_OF_MONTH
1655 // of the year.
1659 // Get the first day of the first full week of the year,
1670 // day of the year.
1675 // Get the limit day for the blocked-off rectangular year; that
1676 // is, the day which is one past the last day of the year,
1677 // after the year has already been filled in with phantom days
1692 // Make sure that the year and day of year are attended to by
1702 // Roll the day of year using millis. Compute the millis for
1703 // the start of the year, and get the length of the year.
1915 // February 29, 2004. If 1, 1, 1, 1 is added to the year
2487 { kResolveRemap | UCAL_DAY_OF_MONTH, UCAL_YEAR, kResolveSTOP }, // if YEAR is set over YEAR_WOY use DAY_OF_MONTH
2513 // precedence for calculating a year
2682 int32_t year;
2685 year = internalGet(UCAL_YEAR_WOY, handleGetExtendedYear());
2686 internalSet(UCAL_EXTENDED_YEAR, year);
2688 year = handleGetExtendedYear();
2689 internalSet(UCAL_EXTENDED_YEAR, year);
2693 fprintf(stderr, "%s:%d: bestField= %s - y=%d\n", __FILE__, __LINE__, fldName(bestField), year);
2696 // Get the Julian day of the day BEFORE the start of this year.
2705 month = getDefaultMonthInYear(year);
2708 int32_t julianDay = handleComputeMonthStart(year, useMonth ? month : 0, useMonth);
2717 dayOfMonth = getDefaultDayInMonth(year, month);
2729 // January 1, year 1 of the given calendar. If julianDay == 0, it
2738 // Get the 0-based localized DOW of day one of the month or year.
2747 // Find the first target DOW (dowLocal) in the month or year.
2748 // Actually, it may be just before the first of the month or year.
2753 // Adjust the target DOW to be in the month or year.
2772 int32_t monthLength = handleGetMonthLength(year, m);
2785 // need to be sure to stay in 'real' year.
2788 int32_t nextJulianDay = handleComputeMonthStart(year+1, 0, FALSE); // jd of day before jan 1
2798 internalGet(bestField), resolveFields(kYearPrecedence), year+1,
2808 // Jan 1 of (yearWoy+1) is in yearWoy+1 - recalculate JD to next year
2835 __FILE__, __LINE__, year, year-1, testDate, julianDay+testDate, nextJulianDay);
2837 if(julianDay+testDate > nextJulianDay) { // is it past Dec 31? (nextJulianDay is day BEFORE year+1's Jan 1)
2838 // Fire up the calculating engines.. retry YWOY = (year-1)
2839 julianDay = handleComputeMonthStart(year-1, 0, FALSE); // jd before Jan 1 of previous year
2849 __FILE__, __LINE__, date, julianDay, year
2855 } /* resolvefields(year) != year_woy */
2909 // what year we fall in, so that other code can set it properly.
2920 int32_t nextJan1Start = handleComputeMonthStart(yearWoy+1, 0, FALSE); // next year's Jan1 start
2923 // January 1, year 1 of the given calendar. If julianDay == 0, it
2932 // Get the 0-based localized DOW of day one of the month or year.
2944 UBool jan1InPrevYear = FALSE; // January 1st in the year of WOY is the 1st week? (i.e. first week is < minimal )
2945 //UBool nextJan1InPrevYear = FALSE; // January 1st of Year of WOY + 1 is in the first week?
2959 // the first week of January is in the previous year
2965 return yearWoy-1; // previous year
2967 return yearWoy; // in this year
2975 (woy-1)*7 + // add the weeks of the year
2982 // we are in week 52 or 53 etc. - actual year is yearWoy+1
2997 return yearWoy+1; // month 0, late woy = in the next year
3014 default: // assume the year is appropriate
3138 // or year will contain the first day of the week, and that the