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():
16 Since glibc 2.19:
17 _DEFAULT_SOURCE
18 Glibc 2.19 and earlier:
19 _BSD_SOURCE || _SVID_SOURCE
20
22 The function returns 365 for a normal year and 366 for a leap year.
23 The calculation for leap year is based on:
24
25 (year) %4 == 0 && ((year) %100 != 0 || (year) %400 == 0)
26
27 The formula is defined in the macro __isleap(year) also found in
28 <time.h>.
29
31 For an explanation of the terms used in this section, see
32 attributes(7).
33
34 ┌──────────┬───────────────┬─────────┐
35 │Interface │ Attribute │ Value │
36 ├──────────┼───────────────┼─────────┤
37 │dysize() │ Thread safety │ MT-Safe │
38 └──────────┴───────────────┴─────────┘
40 This function occurs in SunOS 4.x.
41
43 This is a compatibility function only. Don't use it in new programs.
44
46 strftime(3)
47
49 This page is part of release 4.15 of the Linux man-pages project. A
50 description of the project, information about reporting bugs, and the
51 latest version of this page, can be found at
52 https://www.kernel.org/doc/man-pages/.
53
54
55
56GNU 2016-03-15 DYSIZE(3)