diff options
author | victor <victor@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2006-05-04 13:42:59 +0800 |
---|---|---|
committer | victor <victor@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2006-05-04 13:42:59 +0800 |
commit | d146af9094828a4a0acf6a3da40d7401808e95e6 (patch) | |
tree | 671d1e65630279fc286d86290897c14479830694 /mbbsd/calendar.c | |
parent | 7a5d6709b77119307a05acd1ba0665ab8f1334ac (diff) | |
download | pttbbs-d146af9094828a4a0acf6a3da40d7401808e95e6.tar pttbbs-d146af9094828a4a0acf6a3da40d7401808e95e6.tar.gz pttbbs-d146af9094828a4a0acf6a3da40d7401808e95e6.tar.bz2 pttbbs-d146af9094828a4a0acf6a3da40d7401808e95e6.tar.lz pttbbs-d146af9094828a4a0acf6a3da40d7401808e95e6.tar.xz pttbbs-d146af9094828a4a0acf6a3da40d7401808e95e6.tar.zst pttbbs-d146af9094828a4a0acf6a3da40d7401808e95e6.zip |
more precise date checking
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3352 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/calendar.c')
-rw-r--r-- | mbbsd/calendar.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mbbsd/calendar.c b/mbbsd/calendar.c index 5a398b3d..f3777aab 100644 --- a/mbbsd/calendar.c +++ b/mbbsd/calendar.c @@ -53,7 +53,7 @@ ParseDate(char *date, event_t * t) t->month = atoi(m); t->day = atoi(d); if (t->year < 1 || t->month < 1 || t->month > 12 || - t->day < 1 || t->day > 31) + t->day < 1 || t->day > MonthDay(t->month, IsLeap(t->y))) return 1; t->days = Days(t->year, t->month, t->day); return 0; |