1DYSIZE(3) Linux Programmer's Manual DYSIZE(3)
2
3
4
6 dysize - get number of days for a given year
7
9 #define _BSD_SOURCE /* or: #define _SVID_SOURCE */
10 #include <time.h>
11
12 int dysize(int year);
13
14
16 The function returns 365 for a normal year and 366 for a leap year.
17 The calculation for leap year is based on:
18
19 (year) %4 == 0 && ((year) %100 != 0 || (year) %400 == 0)
20
21 The formula is defined in the macro __isleap(year) also found in
22 <time.h>.
23
25 This function occurs in SunOS 4.x.
26
28 This is a compatibility function only. Don't use it in new programs.
29 The SCO version of this function had a year-2000 problem.
30
32 strftime(3), time(3), feature_test_macros(7)
33
34
35
36GNU November 12, 2001 DYSIZE(3)