MCPcopy Create free account
hub / github.com/eggert/tz / adjusted_yday

Function adjusted_yday

zdump.c:744–751  ·  view source on GitHub ↗

Return A->tm_yday, adjusted to compare it fairly to B->tm_yday. Assume A and B differ by at most one year. */

Source from the content-addressed store, hash-verified

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. */
744static int
745adjusted_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

Callers 1

gmtoffFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected