MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / __isleap

Function __isleap

components/libc/compilers/common/ctime.c:77–83  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

75
76#ifndef __isleap
77static int __isleap(int year)
78{
79 /* every fourth year is a leap year except for century years that are
80 * not divisible by 400. */
81 /* return (year % 4 == 0 && (year % 100 != 0 || year % 400 == 0)); */
82 return (!(year % 4) && ((year % 100) || !(year % 400)));
83}
84#endif
85
86static void num2str(char *c, int i)

Callers 2

gmtime_rFunction · 0.85
timegmFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected