summaryrefslogtreecommitdiff
path: root/src/localtime.c
diff options
context:
space:
mode:
authorandrewsensus <7727721+andrewsensus@users.noreply.github.com>2018-07-13 09:46:30 -0600
committerGitHub <noreply@github.com>2018-07-13 09:46:30 -0600
commit8dc08ae2154a46757adb75ee091219baa2f0cb22 (patch)
tree1ad41f81a9ee4e56b612589068f08f5ec8ae3772 /src/localtime.c
parent699971535e499cf1cabc349ba6b60ce0fec15d71 (diff)
downloadredis-8dc08ae2154a46757adb75ee091219baa2f0cb22.tar.gz
update leap year comment
Diffstat (limited to 'src/localtime.c')
-rw-r--r--src/localtime.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/localtime.c b/src/localtime.c
index 186c8e3c6..3f59a3331 100644
--- a/src/localtime.c
+++ b/src/localtime.c
@@ -50,7 +50,7 @@
* designed to work with what time(NULL) may return, and to support Redis
* logging of the dates, it's not really a complete implementation. */
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 % 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. */