1 .\" Copyright (c) 2001 Walter Harms <walter.harms@informatik.uni-oldenburg.de>
3 .\" This program is free software; you can redistribute it and/or modify
4 .\" it under the terms of the GNU General Public License as published by
5 .\" the Free Software Foundation; version 2 dated June, 1991.
7 .\" This program is distributed in the hope that it will be useful,
8 .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
9 .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 .\" GNU General Public License for more details.
12 .\" You should have received a copy of the GNU General Public License
13 .\" along with this program; if not, write to the Free Software
14 .\" Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
16 .TH DYSIZE 3 "12. November 2001" "GNU" "Bibliotheksfunktionen"
18 dysize \- Berechne die Anzahl der Tage in Jahr
21 .BR "#define _BSD_SOURCE" " /* oder: #define _SVID_SOURCE */
23 .BR "#include <time.h>
25 .BI "int dysize(int " year );
28 Die Funktion gibt 365 für normale Jahre und 366 für Schaltjahre zurück.
29 Die Berechnung der Schaltjahre erfolgt durch:
31 (year) %4 == 0 && ((year) %100 != 0 || (year) %400 == 0)
33 Die Formel findet sich im Macro
39 Diese Funktion taucht in SunOS 4.x auf.
41 Diese Funktion dient ausschließlich der Kompatibilität. Verwenden Sie
42 sie nicht in neuen Programmen. Die SCO-Version dieser Funktion hatte
43 ein Jahr-2000-Problem.