Files
Arquivotheca.Solaris-2.5/lib/libbc/libc/gen/common/dysize.c
seta75D 7c4988eac0 Init
2021-10-11 19:38:01 -03:00

18 lines
408 B
C
Executable File

#pragma ident "@(#)dysize.c 1.3 92/07/21 SMI"
/* from Arthur Olson's 3.1 */
/*LINTLIBRARY*/
#include <tzfile.h>
dysize(y)
{
/*
** The 4.[0123]BSD version of dysize behaves as if the return statement
** below read
** return ((y % 4) == 0) ? DAYS_PER_LYEAR : DAYS_PER_NYEAR;
** but since we'd rather be right than (strictly) compatible. . .
*/
return isleap(y) ? DAYS_PER_LYEAR : DAYS_PER_NYEAR;
}