• Home
  • Raw
  • Download

Lines Matching full:year

44     { -5000000, -5000000,  5000000,  5000000}, // YEAR
71 * Due to the rules for postponing the start of the year to avoid having
72 * certain holidays fall on the sabbath, the year can end up being three
93 * The cumulative # of days to the end of each month in a non-leap year
117 * The cumulative # of days to the end of each month in a leap year
228 int32_t year = get(UCAL_YEAR, status); in add() local
234 if (acrossAdar1 && month>=ADAR_1 && !isLeapYear(year)) { in add()
241 ++year; in add()
248 if (acrossAdar1 && month<=ADAR_1 && !isLeapYear(year)) { in add()
255 --year; in add()
260 set(UCAL_YEAR, year); in add()
320 int32_t year = get(UCAL_YEAR, status); in roll() local
322 UBool leapYear = isLeapYear(year); in roll()
323 int32_t yearLength = monthsInYear(year); in roll()
326 // If it's not a leap year and we're rolling past the missing month in roll()
359 // It is used to calculate the approximate year and month of a given
365 // The time of the new moon (in parts) on 1 Tishri, year 1 (the epoch)
371 * Finds the day # of the first day in the given Hebrew year.
373 * in that year.
390 int32_t HebrewCalendar::startOfYear(int32_t year, UErrorCode &status) in startOfYear() argument
393 int32_t day = CalendarCache::get(&gCache, year, status); in startOfYear()
396 int32_t months = (235 * year - 234) / 19; // # of months before year in startOfYear()
409 if (wd == 1 && frac > 15*HOUR_PARTS+204 && !isLeapYear(year) ) { in startOfYear()
411 // on a Tuesday and it is not a leap year, postpone by 2 days. in startOfYear()
415 else if (wd == 0 && frac > 21*HOUR_PARTS+589 && isLeapYear(year-1) ) { in startOfYear()
417 // on a Monday and *last* year was a leap year, postpone by 1 day. in startOfYear()
421 CalendarCache::put(&gCache, year, day, status); in startOfYear()
439 * Returns the the type of a given year.
440 * 0 "Deficient" year with 353 or 383 days
441 * 1 "Normal" year with 354 or 384 days
442 * 2 "Complete" year with 355 or 385 days
444 int32_t HebrewCalendar::yearType(int32_t year) const in yearType()
446 int32_t yearLength = handleGetYearLength(year); in yearType()
462 //throw new RuntimeException("Illegal year length " + yearLength + " in year " + year); in yearType()
469 * Determine whether a given Hebrew year is a leap year
471 * The rule here is that if (year % 19) == 0, 3, 6, 8, 11, 14, or 17.
474 UBool HebrewCalendar::isLeapYear(int32_t year) { in isLeapYear() argument
475 //return (year * 12 + 17) % 19 >= 12; in isLeapYear()
476 int32_t x = (year*12 + 17) % 19; in isLeapYear()
480 int32_t HebrewCalendar::monthsInYear(int32_t year) { in monthsInYear() argument
481 return isLeapYear(year) ? 13 : 12; in monthsInYear()
496 * Returns the length of the given month in the given year
501 // obtain the correct year. We correct to in handleGetMonthLength()
502 // a 12- or 13-month year (add/subtract 12 or 13, depending in handleGetMonthLength()
503 // on the year) but since we _always_ number from 0..12, and in handleGetMonthLength()
504 // the leap year determines whether or not month 5 (Adar 1) in handleGetMonthLength()
505 // is present, we allow 0..12 in any given year. in handleGetMonthLength()
527 * Returns the number of days in the given Hebrew year
551 * <li>YEAR
570 int32_t year = (int32_t)( ((19. * m + 234.) / 235.) + 1.); // Years (approx) in handleComputeFields() local
571 int32_t ys = startOfYear(year, status); // 1st day of year in handleComputeFields()
576 year--; in handleComputeFields()
577 ys = startOfYear(year, status); in handleComputeFields()
582 int32_t type = yearType(year); in handleComputeFields()
583 UBool isLeap = isLeapYear(year); in handleComputeFields()
607 internalSet(UCAL_YEAR, year); in handleComputeFields()
608 internalSet(UCAL_EXTENDED_YEAR, year); in handleComputeFields()
622 int32_t year; in handleGetExtendedYear() local
624 year = internalGet(UCAL_EXTENDED_YEAR, 1); // Default to year 1 in handleGetExtendedYear()
626 year = internalGet(UCAL_YEAR, 1); // Default to year 1 in handleGetExtendedYear()
628 return year; in handleGetExtendedYear()
632 * Return JD of start of given month/year.
638 // obtain the correct year. We correct to in handleComputeMonthStart()
639 // a 12- or 13-month year (add/subtract 12 or 13, depending in handleComputeMonthStart()
640 // on the year) but since we _always_ number from 0..12, and in handleComputeMonthStart()
641 // the leap year determines whether or not month 5 (Adar 1) in handleComputeMonthStart()
642 // is present, we allow 0..12 in any given year. in handleComputeMonthStart()
682 * The system maintains a static default century start date and Year. They are
684 * and year are set, they do not change.