Return A->tm_yday, adjusted to compare it fairly to B->tm_yday. Assume A and B differ by at most one year. */
| 742 | /* Return A->tm_yday, adjusted to compare it fairly to B->tm_yday. |
| 743 | Assume A and B differ by at most one year. */ |
| 744 | static int |
| 745 | adjusted_yday(struct tm const *a, struct tm const *b) |
| 746 | { |
| 747 | int yday = a->tm_yday; |
| 748 | if (b->tm_year < a->tm_year) |
| 749 | yday += 365 + isleap_sum(b->tm_year, TM_YEAR_BASE); |
| 750 | return yday; |
| 751 | } |
| 752 | #endif |
| 753 | |
| 754 | /* If A is the broken-down local time and B the broken-down UT for |