summaryrefslogtreecommitdiffstats
path: root/man3/dysize.3
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 19:40:15 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 19:40:15 +0000
commit399644e47874bff147afb19c89228901ac39340e (patch)
tree1c4c0b733f4c16b5783b41bebb19194a9ef62ad1 /man3/dysize.3
parentInitial commit. (diff)
downloadmanpages-399644e47874bff147afb19c89228901ac39340e.tar.xz
manpages-399644e47874bff147afb19c89228901ac39340e.zip
Adding upstream version 6.05.01.upstream/6.05.01
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'man3/dysize.3')
-rw-r--r--man3/dysize.370
1 files changed, 70 insertions, 0 deletions
diff --git a/man3/dysize.3 b/man3/dysize.3
new file mode 100644
index 0000000..7e2d328
--- /dev/null
+++ b/man3/dysize.3
@@ -0,0 +1,70 @@
+'\" t
+.\" Copyright 2001 Walter Harms (walter.harms@informatik.uni-oldenburg.de)
+.\"
+.\" SPDX-License-Identifier: Linux-man-pages-copyleft
+.\"
+.\" aeb: some corrections
+.TH dysize 3 2023-07-20 "Linux man-pages 6.05.01"
+.SH NAME
+dysize \- get number of days for a given year
+.SH LIBRARY
+Standard C library
+.RI ( libc ", " \-lc )
+.SH SYNOPSIS
+.nf
+.B "#include <time.h>"
+.PP
+.BI "int dysize(int " year );
+.fi
+.PP
+.RS -4
+Feature Test Macro Requirements for glibc (see
+.BR feature_test_macros (7)):
+.RE
+.PP
+.BR dysize ():
+.nf
+ Since glibc 2.19:
+ _DEFAULT_SOURCE
+ glibc 2.19 and earlier:
+ _BSD_SOURCE || _SVID_SOURCE
+.fi
+.SH DESCRIPTION
+The function returns 365 for a normal year and 366 for a leap year.
+The calculation for leap year is based on:
+.PP
+.in +4n
+.EX
+(year) %4 == 0 && ((year) %100 != 0 || (year) %400 == 0)
+.EE
+.in
+.PP
+The formula is defined in the macro
+.I __isleap(year)
+also found in
+.IR <time.h> .
+.SH ATTRIBUTES
+For an explanation of the terms used in this section, see
+.BR attributes (7).
+.TS
+allbox;
+lbx lb lb
+l l l.
+Interface Attribute Value
+T{
+.na
+.nh
+.BR dysize ()
+T} Thread safety MT-Safe
+.TE
+.sp 1
+.SH STANDARDS
+None.
+.SH HISTORY
+SunOS 4.x.
+.PP
+This is a compatibility function only.
+Don't use it in new programs.
+.\" The SCO version of this function had a year-2000 problem.
+.SH SEE ALSO
+.BR strftime (3)