]> git.ipfire.org Git - thirdparty/man-pages.git/blame - man3/dysize.3
getcpu.2, sendfile.2, cmsg.3, rtnetlink.3, arp.7, ddp.7, fifo.7, icmp.7, ip.7, ipv6...
[thirdparty/man-pages.git] / man3 / dysize.3
CommitLineData
fea681da
MK
1.\" Copyright 2001 Walter Harms (walter.harms@informatik.uni-oldenburg.de)
2.\"
4b72fb64 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
0e4d2d22 26.TH DYSIZE 3 2010-09-22 "GNU" "Linux Programmer's Manual"
fea681da
MK
27.SH NAME
28dysize \- get number of days for a given year
29.SH SYNOPSIS
0daa9e92 30.B "#include <time.h>"
fea681da
MK
31.sp
32.BI "int dysize(int " year );
cc4615cc
MK
33.sp
34.in -4n
35Feature Test Macro Requirements for glibc (see
36.BR feature_test_macros (7)):
37.in
38.sp
39.BR dysize ():
40_BSD_SOURCE || _SVID_SOURCE
fea681da
MK
41.SH DESCRIPTION
42The function returns 365 for a normal year and 366 for a leap year.
43The calculation for leap year is based on:
44.sp
45(year) %4 == 0 && ((year) %100 != 0 || (year) %400 == 0)
46.sp
47The formula is defined in the macro
48.I __isleap(year)
49also found in
50.IR <time.h> .
47297adb 51.SH CONFORMING TO
fea681da
MK
52This function occurs in SunOS 4.x.
53.SH NOTES
c13182ef
MK
54This is a compatibility function only.
55Don't use it in new programs.
0e4d2d22 56.\" The SCO version of this function had a year-2000 problem.
47297adb 57.SH SEE ALSO
cc4615cc 58.BR strftime (3)