1DYSIZE(3)                  Linux Programmer's Manual                 DYSIZE(3)
2
3
4

NAME

6       dysize - get number of days for a given year
7

SYNOPSIS

9       #include <time.h>
10
11       int dysize(int year);
12
13   Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
14
15       dysize():
16           Since glibc 2.19:
17               _DEFAULT_SOURCE
18           Glibc 2.19 and earlier:
19               _BSD_SOURCE || _SVID_SOURCE
20

DESCRIPTION

22       The  function  returns  365  for a normal year and 366 for a leap year.
23       The calculation for leap year is based on:
24
25           (year) %4 == 0 && ((year) %100 != 0 || (year) %400 == 0)
26
27       The formula is defined  in  the  macro  __isleap(year)  also  found  in
28       <time.h>.
29

ATTRIBUTES

31       For  an  explanation  of  the  terms  used  in  this  section,  see at‐
32       tributes(7).
33
34       ┌────────────────────────────────────────────┬───────────────┬─────────┐
35Interface                                   Attribute     Value   
36       ├────────────────────────────────────────────┼───────────────┼─────────┤
37dysize()                                    │ Thread safety │ MT-Safe │
38       └────────────────────────────────────────────┴───────────────┴─────────┘
39

CONFORMING TO

41       This function occurs in SunOS 4.x.
42

NOTES

44       This is a compatibility function only.  Don't use it in new programs.
45

SEE ALSO

47       strftime(3)
48

COLOPHON

50       This page is part of release 5.12 of the Linux  man-pages  project.   A
51       description  of  the project, information about reporting bugs, and the
52       latest    version    of    this    page,    can     be     found     at
53       https://www.kernel.org/doc/man-pages/.
54
55
56
57GNU                               2021-03-22                         DYSIZE(3)
Impressum