Lines Matching defs:days
531 long days = *when / SECSPERDAY;
536 _tmbuf.tm_wday = (days + EPOCH_WDAY) % 7;
539 while (days >= year_lengths[isleap]) {
540 days -= year_lengths[isleap];
545 _tmbuf.tm_yday = days;
546 while (days >= mon_lengths[isleap][_tmbuf.tm_mon])
547 days -= mon_lengths[isleap][_tmbuf.tm_mon++];
548 _tmbuf.tm_mday = days + 1;
743 int years, months, days, hours, minutes, seconds;
747 days = tm->tm_mday - 1; /* 1..31 -> 0..30 */
754 ADJUST_TM(hours, days, 24)
756 if (days < 0)
762 days += monthlen(months, years);
763 } while (days < 0);
765 while (days >= monthlen(months, years)) {
766 days -= monthlen(months, years);
776 tm->tm_mday = days + 1;
781 /* Set `days' to the number of days into the year. */
782 days += YDAYS(months, years);
783 tm->tm_yday = days;
785 /* Now calculate `days' to the number of days since Jan 1, 1970. */
786 days = (unsigned)days + 365 * (unsigned)(years - EPOCH_YEAR) +
788 tm->tm_wday = ((unsigned)days + EPOCH_WDAY) % 7;
808 return (time_t)(SECSPERDAY * (unsigned long)(unsigned)days +