3 # Desc: Template to display date
6 # Desc: Date without separators (YYYYmmdd)
8 # Output: stdout: date (ISO-8601, no separators)
9 local TIME_CURRENT DATE_CURRENT_SHORT
10 TIME_CURRENT
="$(date --iso-8601=seconds)" ; # Produce `date`-parsable current timestamp with resolution of 1 second.
11 DATE_CURRENT_SHORT
="$(date -d "$TIME_CURRENT" +%Y%m%d)"; # Produce separator-less current date with resolution 1 day.
12 echo "$DATE_CURRENT_SHORT";
13 } # Get date without separators
15 #==BEGIN sample code==
16 echo "The current day is:$(dateShort)"
19 # Author: Steven Baltakatei Sandoval