]>
Commit | Line | Data |
---|---|---|
fea681da MK |
1 | .\" Copyright 2001 Walter Harms (walter.harms@informatik.uni-oldenburg.de) |
2 | .\" | |
93015253 | 3 | .\" %%%LICENSE_START(VERBATIM) |
fea681da MK |
4 | .\" Permission is granted to make and distribute verbatim copies of this |
5 | .\" manual provided the copyright notice and this permission notice are | |
6 | .\" preserved on all copies. | |
7 | .\" | |
8 | .\" Permission is granted to copy and distribute modified versions of this | |
9 | .\" manual under the conditions for verbatim copying, provided that the | |
10 | .\" entire resulting derived work is distributed under the terms of a | |
11 | .\" permission notice identical to this one. | |
c13182ef | 12 | .\" |
fea681da MK |
13 | .\" Since the Linux kernel and libraries are constantly changing, this |
14 | .\" manual page may be incorrect or out-of-date. The author(s) assume no | |
15 | .\" responsibility for errors or omissions, or for damages resulting from | |
16 | .\" the use of the information contained herein. The author(s) may not | |
17 | .\" have taken the same level of care in the production of this manual, | |
18 | .\" which is licensed free of charge, as they might when working | |
19 | .\" professionally. | |
c13182ef | 20 | .\" |
fea681da MK |
21 | .\" Formatted or processed versions of this manual, if unaccompanied by |
22 | .\" the source, must acknowledge the copyright and authors of this work. | |
4b72fb64 | 23 | .\" %%%LICENSE_END |
fea681da MK |
24 | .\" |
25 | .\" aeb: some corrections | |
97986708 | 26 | .TH DYSIZE 3 2016-03-15 "GNU" "Linux Programmer's Manual" |
fea681da MK |
27 | .SH NAME |
28 | dysize \- get number of days for a given year | |
29 | .SH SYNOPSIS | |
0daa9e92 | 30 | .B "#include <time.h>" |
68e4db0a | 31 | .PP |
fea681da | 32 | .BI "int dysize(int " year ); |
68e4db0a | 33 | .PP |
cc4615cc MK |
34 | .in -4n |
35 | Feature Test Macro Requirements for glibc (see | |
36 | .BR feature_test_macros (7)): | |
37 | .in | |
68e4db0a | 38 | .PP |
cc4615cc | 39 | .BR dysize (): |
51c612fb MK |
40 | Since glibc 2.19: |
41 | _DEFAULT_SOURCE | |
42 | Glibc 2.19 and earlier: | |
43 | _BSD_SOURCE || _SVID_SOURCE | |
fea681da MK |
44 | .SH DESCRIPTION |
45 | The function returns 365 for a normal year and 366 for a leap year. | |
46 | The calculation for leap year is based on: | |
bdd915e2 MK |
47 | .PP |
48 | .in +4n | |
49 | .EX | |
fea681da | 50 | (year) %4 == 0 && ((year) %100 != 0 || (year) %400 == 0) |
bdd915e2 MK |
51 | .EE |
52 | .in | |
53 | .PP | |
fea681da MK |
54 | The formula is defined in the macro |
55 | .I __isleap(year) | |
56 | also found in | |
57 | .IR <time.h> . | |
3e323f12 | 58 | .SH ATTRIBUTES |
88824617 MK |
59 | For an explanation of the terms used in this section, see |
60 | .BR attributes (7). | |
61 | .TS | |
62 | allbox; | |
63 | lb lb lb | |
64 | l l l. | |
65 | Interface Attribute Value | |
66 | T{ | |
3e323f12 | 67 | .BR dysize () |
88824617 MK |
68 | T} Thread safety MT-Safe |
69 | .TE | |
47297adb | 70 | .SH CONFORMING TO |
fea681da MK |
71 | This function occurs in SunOS 4.x. |
72 | .SH NOTES | |
c13182ef MK |
73 | This is a compatibility function only. |
74 | Don't use it in new programs. | |
0e4d2d22 | 75 | .\" The SCO version of this function had a year-2000 problem. |
47297adb | 76 | .SH SEE ALSO |
cc4615cc | 77 | .BR strftime (3) |