Lines Matching defs:days
367 * and full days before a date: 1970-01-01 would be (1969, 0, 0) in
376 * (day number). This is the number of days elapsed since 0000-12-31
669 * Split a 64bit seconds value into elapsed days in 'res.hi' and
827 * Split a 32bit seconds value into h/m/s and excessive days. This
864 * Given the number of elapsed days in the calendar era, split this
866 * of elapsed days of that year in 'res.lo'.
874 int32_t days,
890 * We want to execute '(days * 4 + 3) /% 146097' under floor
892 * calculate 'floor((days + 0.75) / 36524.25)', but we want to
899 ud64 = ((uint64_t)days << 2) | 3u;
900 sf64 = (uint64_t)-(days < 0);
907 /* '4*days+3' suffers from range overflow when going to the
922 uint32_t ux = ((uint32_t)days << 2) | 3;
923 uday = (days < 0) ? 130717u : 0u; /* sign dgt */
924 uday += ((days >> 18) & 0x01FFFu) * 25897u; /* hi dgt (src!) */
932 /* Split off years in century -- days >= 0 here, and we're far
954 * Given a number of elapsed days in a year and a leap year indicator,
955 * split the number of elapsed days into the number of elapsed months in
956 * 'res.hi' and the number of elapsed days of that month in 'res.lo'.
959 * days is not in the valid range!
968 /* Use the unshifted-year, February-with-30-days approach here.
974 /* convert 'isleap' to number of defective days */
976 /* adjust for February of 30 nominal days */
979 /* if in range, convert to months and days in month */
1068 int32_t days;
1071 days = priv_timesplit(ts, sec);
1076 return days;
1091 int32_t days;
1094 days = priv_timesplit(ts, sec);
1099 return days;
1175 /* multiplication helper. Seconds in days and weeks are multiples of 128,
1223 * Merge a number of days and a number of seconds into seconds,
1229 int32_t days,
1237 res.q_s = days;
1243 res = _dwjoin(675, days, secs);
1316 * Convert elapsed years in Era into elapsed days in Era.
1329 * Convert a number of elapsed month in a year into elapsed days in year.
1333 * while 'res.lo' will contain the number of elapsed days since start
1336 * This code uses the shifted-month-approach to convert month to days,
1371 /* Get cummulated days in year with unshift. Use the fractional
1382 * Convert ELAPSED years/months/days of gregorian calendar to elapsed
1383 * days in Gregorian epoch.
1385 * If you want to convert years and days-of-year, just give a month of
1411 * Convert ELAPSED years/months/days of gregorian calendar to elapsed
1412 * days in year.
1415 * year, even if months & days are off-scale.
1443 * Convert elapsed days and the hour/minute/second information into
1523 * years and elapsed days, then remove the elapsed days from the
1587 int32_t days, secs;
1589 days = ntpcal_date_to_rd(jd) - DAY_UNIX_STARTS;
1591 join = ntpcal_dayjoin(days, secs);
1629 * into days and seconds, shift days into CE domain and
1730 * 146097 days, or 20871 weeks.
1907 * Split NTP time into days and seconds, shift days into CE
1918 /* split days into days and weeks, using floor division in unsigned */
1964 int32_t weeks, days, secs;
1968 days = weeks * 7 + (int32_t)id->weekday;
1969 /* days is RDN of ISO date now */
1972 return ntpcal_dayjoin(days - DAY_NTP_STARTS, secs);
2157 * 2) The weekday of the 1st day of a century shifts by 5 days