]> git.ipfire.org Git - thirdparty/man-pages.git/blob - man3/dysize.3
All pages: Remove the 5th argument to .TH
[thirdparty/man-pages.git] / man3 / dysize.3
1 .\" Copyright 2001 Walter Harms (walter.harms@informatik.uni-oldenburg.de)
2 .\"
3 .\" SPDX-License-Identifier: Linux-man-pages-copyleft
4 .\"
5 .\" aeb: some corrections
6 .TH DYSIZE 3 2021-03-22 "Linux man-pages (unreleased)"
7 .SH NAME
8 dysize \- get number of days for a given year
9 .SH LIBRARY
10 Standard C library
11 .RI ( libc ", " \-lc )
12 .SH SYNOPSIS
13 .nf
14 .B "#include <time.h>"
15 .PP
16 .BI "int dysize(int " year );
17 .fi
18 .PP
19 .RS -4
20 Feature Test Macro Requirements for glibc (see
21 .BR feature_test_macros (7)):
22 .RE
23 .PP
24 .BR dysize ():
25 .nf
26 Since glibc 2.19:
27 _DEFAULT_SOURCE
28 Glibc 2.19 and earlier:
29 _BSD_SOURCE || _SVID_SOURCE
30 .fi
31 .SH DESCRIPTION
32 The function returns 365 for a normal year and 366 for a leap year.
33 The calculation for leap year is based on:
34 .PP
35 .in +4n
36 .EX
37 (year) %4 == 0 && ((year) %100 != 0 || (year) %400 == 0)
38 .EE
39 .in
40 .PP
41 The formula is defined in the macro
42 .I __isleap(year)
43 also found in
44 .IR <time.h> .
45 .SH ATTRIBUTES
46 For an explanation of the terms used in this section, see
47 .BR attributes (7).
48 .ad l
49 .nh
50 .TS
51 allbox;
52 lbx lb lb
53 l l l.
54 Interface Attribute Value
55 T{
56 .BR dysize ()
57 T} Thread safety MT-Safe
58 .TE
59 .hy
60 .ad
61 .sp 1
62 .SH STANDARDS
63 This function occurs in SunOS 4.x.
64 .SH NOTES
65 This is a compatibility function only.
66 Don't use it in new programs.
67 .\" The SCO version of this function had a year-2000 problem.
68 .SH SEE ALSO
69 .BR strftime (3)