1 .\" Copyright 2001 Walter Harms (walter.harms@informatik.uni-oldenburg.de)
3 .\" %%%LICENSE_START(VERBATIM)
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.
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.
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
21 .\" Formatted or processed versions of this manual, if unaccompanied by
22 .\" the source, must acknowledge the copyright and authors of this work.
25 .\" aeb: some corrections
26 .TH DYSIZE 3 2021-03-22 "GNU" "Linux Programmer's Manual"
28 dysize \- get number of days for a given year
31 .B "#include <time.h>"
33 .BI "int dysize(int " year );
37 Feature Test Macro Requirements for glibc (see
38 .BR feature_test_macros (7)):
45 Glibc 2.19 and earlier:
46 _BSD_SOURCE || _SVID_SOURCE
49 The function returns 365 for a normal year and 366 for a leap year.
50 The calculation for leap year is based on:
54 (year) %4 == 0 && ((year) %100 != 0 || (year) %400 == 0)
58 The formula is defined in the macro
63 For an explanation of the terms used in this section, see
71 Interface Attribute Value
74 T} Thread safety MT-Safe
80 This function occurs in SunOS 4.x.
82 This is a compatibility function only.
83 Don't use it in new programs.
84 .\" The SCO version of this function had a year-2000 problem.