OSDN Git Service

(split) Import translated manuals from JM CVS Repository.
[linuxjm/LDP_man-pages.git] / original / man3 / dysize.3
1 .\"  Copyright 2001 Walter Harms (walter.harms@informatik.uni-oldenburg.de)
2 .\"
3 .\" Permission is granted to make and distribute verbatim copies of this
4 .\" manual provided the copyright notice and this permission notice are
5 .\" preserved on all copies.
6 .\"
7 .\" Permission is granted to copy and distribute modified versions of this
8 .\" manual under the conditions for verbatim copying, provided that the
9 .\" entire resulting derived work is distributed under the terms of a
10 .\" permission notice identical to this one.
11 .\"
12 .\" Since the Linux kernel and libraries are constantly changing, this
13 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
14 .\" responsibility for errors or omissions, or for damages resulting from
15 .\" the use of the information contained herein.  The author(s) may not
16 .\" have taken the same level of care in the production of this manual,
17 .\" which is licensed free of charge, as they might when working
18 .\" professionally.
19 .\"
20 .\" Formatted or processed versions of this manual, if unaccompanied by
21 .\" the source, must acknowledge the copyright and authors of this work.
22 .\"
23 .\" aeb: some corrections
24 .TH DYSIZE 3 2007-07-26 "GNU" "Linux Programmer's Manual"
25 .SH NAME
26 dysize \- get number of days for a given year
27 .SH SYNOPSIS
28 .B "#include <time.h>"
29 .sp
30 .BI "int dysize(int " year );
31 .sp
32 .in -4n
33 Feature Test Macro Requirements for glibc (see
34 .BR feature_test_macros (7)):
35 .in
36 .sp
37 .BR dysize ():
38 _BSD_SOURCE || _SVID_SOURCE
39 .SH DESCRIPTION
40 The function returns 365 for a normal year and 366 for a leap year.
41 The calculation for leap year is based on:
42 .sp
43 (year) %4 == 0 && ((year) %100 != 0 || (year) %400 == 0)
44 .sp
45 The formula is defined in the macro
46 .I __isleap(year)
47 also found in
48 .IR <time.h> .
49 .SH "CONFORMING TO"
50 This function occurs in SunOS 4.x.
51 .SH NOTES
52 This is a compatibility function only.
53 Don't use it in new programs.
54 The SCO version of this function had a year-2000 problem.
55 .SH "SEE ALSO"
56 .BR strftime (3)