Unverified Commit ff14945e authored by Salvatore Sanfilippo's avatar Salvatore Sanfilippo Committed by GitHub
Browse files

Merge pull request #5360 from youjh90/unstable

update leap year comment when div by 400
parents 731f1022 a344c4cf
...@@ -28,3 +28,4 @@ deps/lua/src/liblua.a ...@@ -28,3 +28,4 @@ deps/lua/src/liblua.a
.prerequisites .prerequisites
*.dSYM *.dSYM
Makefile.dep Makefile.dep
.vscode/*
...@@ -52,8 +52,8 @@ ...@@ -52,8 +52,8 @@
static int is_leap_year(time_t year) { static int is_leap_year(time_t year) {
if (year % 4) return 0; /* A year not 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* not by 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 400 is leap. */
} }
void nolocks_localtime(struct tm *tmp, time_t t, time_t tz, int dst) { void nolocks_localtime(struct tm *tmp, time_t t, time_t tz, int dst) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment