Gnu date

From wikinotes
Revision as of 22:52, 6 August 2021 by Will (talk | contribs)

date formats the current date, or translates between date formats.
You may also be interested in bsd date.

date -d 'last monday 2pm'
date -d 'next monday 2pm'
date -d 'today'

# alternatively, if you need a date in iso-8601 format:
date -u +"%Y-%m-%dT%H:%M:%SZ"  -d 'next monday 5:30pm'