(Video materials in preparation)
isdate : Checks an 8-digit date
Usage : isdate <date>
Version : Mon Jan 17 11:50:14 JST 2022
Edition : 1
Checks if the 8-digit date passed as <date> is a valid date. If it
is, the command exits normally, otherwise the command exits with an
error (exit status 1).
$ isdate 20090101
$ echo $?
0
$ isdate 20090199
$ echo $?
1
Leap Years
Years divisible by 4 are leap years. (February has 29 days)
Years divisible by 100 are not leap years. (February has 28 days)
Years divisible by 400 are leap years. (February has 29 days)
September 1752 is missing 11 days from the 3rd to the 13th, however
this command does not cause an error for these dates. These days
were removed when converting from the Julian calendar to the
Gregorian calendar. ("$ cal 9 1752" is used for confirmation.)
# 20230609 takahashi modify from "13 days from the 3rd to the 15th" to "11 days from the 3rd to the 13th" in <Known Issues>