mirror of
https://github.com/fluencelabs/redis
synced 2025-04-01 23:31:03 +00:00
update leap year comment
This commit is contained in:
parent
699971535e
commit
8dc08ae215
@ -50,7 +50,7 @@
|
|||||||
* designed to work with what time(NULL) may return, and to support Redis
|
* designed to work with what time(NULL) may return, and to support Redis
|
||||||
* logging of the dates, it's not really a complete implementation. */
|
* logging of the dates, it's not really a complete implementation. */
|
||||||
static int is_leap_year(time_t year) {
|
static int is_leap_year(time_t year) {
|
||||||
if (year % 4) return 0; /* A year divisible by 4 is not leap. */
|
if (year % 4) return 0; /* A year not divisible by 4 is not leap. */
|
||||||
else if (year % 100) return 1; /* If div by 4 and not 100 is surely leap. */
|
else if (year % 100) return 1; /* If div by 4 and not 100 is surely leap. */
|
||||||
else if (year % 400) return 0; /* If div by 100 *and* 400 is not leap. */
|
else if (year % 400) return 0; /* If div by 100 *and* 400 is not leap. */
|
||||||
else return 1; /* If div by 100 and not by 400 is leap. */
|
else return 1; /* If div by 100 and not by 400 is leap. */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user