Lines Matching full:years
22 int64_t years = *remainingDays / daysPerYears; in computeRemainingYears() local
23 if (years == quotientYears) in computeRemainingYears()
24 years--; in computeRemainingYears()
25 *remainingDays -= years * daysPerYears; in computeRemainingYears()
26 return years; in computeRemainingYears()
35 // makes it easier to count how many leap years have passed using division.
37 // While calculating numbers of years in the days, the following algorithm
38 // subdivides the days into the number of 400 years, the number of 100 years and
39 // the number of 4 years. These numbers of cycle years are used in calculating
41 // and isLeapYear(). Then compute the total number of years in days from these
44 // Compute the number of months from the remaining days. Finally, adjust years
88 // The remaining number of years after computing the number of in update_from_seconds()
90 // years. in update_from_seconds()
94 // The remaining number of years after computing the number of in update_from_seconds()
95 // "hundred year cycles" will be 25 four year cycles or less in 100 years. in update_from_seconds()
99 // The remaining number of years after computing the number of in update_from_seconds()
100 // "four year cycles" will be 4 one year cycles or less in 4 years. in update_from_seconds()
104 // Calculate number of years from year 2000. in update_from_seconds()
105 int64_t years = remainingYears + 4 * numOfFourYearCycles + in update_from_seconds() local
126 years++; in update_from_seconds()
129 if (years > INT_MAX || years < INT_MIN) in update_from_seconds()
132 // All the data (years, month and remaining days) was calculated from in update_from_seconds()
134 tm->tm_year = static_cast<int>(years + 2000 - TimeConstants::TIME_YEAR_BASE); in update_from_seconds()