# Usage: script.sh [year]
# Input: arg1: year (string)
# Output: none
-# Version: 0.0.1
+# Version: 0.1.0 (TODO: Support expanded year formats (i.e. ±YYYYYY-mm-dd)
# Example: Running 'mw_create_redirect_day_month.sh 2022' creates
# directory 'wikicode' in working directory. It then populates it
if [[ $# -ne 1 ]]; then die "FATAL:Invalid number of arguments:$#"; fi;
## check year
- pattern='^[0-9]{4}$';
+ pattern='^[0-9]{4}$';
if [[ ! $year =~ $pattern ]]; then die "FATAL:Not a 4-digit year."; fi;
if [[ ! $year -gt 1583 ]]; then die "FATAL:Not a gregorian calendar year."; fi;