Home | History | Annotate | Download | only in src

Lines Matching refs:days

78     int days, int* year, int* month, int* day) {
80 // Check conservatively if the given 'days' has
81 // the same year and month as the cached 'days'.
82 int new_day = ymd_day_ + (days - ymd_days_);
85 ymd_days_ = days;
92 int save_days = days;
94 days += kDaysOffset;
95 *year = 400 * (days / kDaysIn400Years) - kYearsOffset;
96 days %= kDaysIn400Years;
98 ASSERT(DaysFromYearMonth(*year, 0) + days == save_days);
100 days--;
101 int yd1 = days / kDaysIn100Years;
102 days %= kDaysIn100Years;
105 days++;
106 int yd2 = days / kDaysIn4Years;
107 days %= kDaysIn4Years;
110 days--;
111 int yd3 = days / 365;
112 days %= 365;
118 ASSERT(days >= -1);
119 ASSERT(is_leap || (days >= 0));
120 ASSERT((days < 365) || (is_leap && (days < 366)));
122 ASSERT(is_leap || ((DaysFromYearMonth(*year, 0) + days) == save_days));
123 ASSERT(!is_leap || ((DaysFromYearMonth(*year, 0) + days + 1) == save_days));
125 days += is_leap;
128 if (days >= 31 + 28 + is_leap) {
129 days -= 31 + 28 + is_leap;
132 if (days < kDaysInMonths[i]) {
134 *day = days + 1;
137 days -= kDaysInMonths[i];
141 if (days < 31) {
143 *day = days + 1;
146 *day = days - 31 + 1;
177 // ECMA 262 - 15.9.1.1, i.e. upto 100,000,000 days on either side of