1DYSIZE(3) Linux Programmer's Manual DYSIZE(3)
2
3
4
6 dysize - get number of days for a given year
7
9 #include <time.h>
10
11 int dysize(int year);
12
13 Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
14
15 dysize(): _BSD_SOURCE || _SVID_SOURCE
16
18 The function returns 365 for a normal year and 366 for a leap year.
19 The calculation for leap year is based on:
20
21 (year) %4 == 0 && ((year) %100 != 0 || (year) %400 == 0)
22
23 The formula is defined in the macro __isleap(year) also found in
24 <time.h>.
25
27 This function occurs in SunOS 4.x.
28
30 This is a compatibility function only. Don't use it in new programs.
31 The SCO version of this function had a year-2000 problem.
32
34 strftime(3)
35
37 This page is part of release 3.22 of the Linux man-pages project. A
38 description of the project, and information about reporting bugs, can
39 be found at http://www.kernel.org/doc/man-pages/.
40
41
42
43GNU 2007-07-26 DYSIZE(3)