Lines Matching defs:yearday
3504 int yearday;
3562 * tm_yday, we work with the normalised year and get a new yearday value for
3563 * January 1st, which we subtract from the yearday value we had earlier,
3573 * same rules we used to build the yearday, you'll only get strange results
3599 yearday = DAYS_PER_YEAR * year + year/4 - year/100 + year/400;
3600 yearday += month*MONTH_TO_DAYS + mday + jday;
3620 yearday += (secs/SECS_PER_DAY)-1;
3624 yearday += (secs/SECS_PER_DAY);
3629 yearday += (secs/SECS_PER_DAY);
3639 * The algorithm for yearday has (so far) left it high by 428.
3646 jday = yearday; /* save for later fixup vis-a-vis Jan 1 */
3647 yearday -= YEAR_ADJUST;
3648 year = (yearday / DAYS_PER_QCENT) * 400;
3649 yearday %= DAYS_PER_QCENT;
3650 odd_cent = yearday / DAYS_PER_CENT;
3652 yearday %= DAYS_PER_CENT;
3653 year += (yearday / DAYS_PER_QYEAR) * 4;
3654 yearday %= DAYS_PER_QYEAR;
3655 odd_year = yearday / DAYS_PER_YEAR;
3657 yearday %= DAYS_PER_YEAR;
3658 if (!yearday && (odd_cent==4 || odd_year==4)) { /* catch Feb 29 */
3660 yearday = 29;
3663 yearday += YEAR_ADJUST; /* recover March 1st crock */
3664 month = yearday*DAYS_TO_MONTH;
3665 yearday -= month*MONTH_TO_DAYS;
3676 if (yearday) {
3677 ptm->tm_mday = yearday;
3684 /* re-build yearday based on Jan 1 to get tm_yday */
3686 yearday = year*DAYS_PER_YEAR + year/4 - year/100 + year/400;
3687 yearday += 14*MONTH_TO_DAYS + 1;
3688 ptm->tm_yday = jday - yearday;