Gnu date

From wikinotes
Revision as of 19:37, 28 March 2021 by Will (talk | contribs) (Created page with "date formats the current date, or translates between date formats. <source lang="bash"> date -d 'last monday 2pm' date -d 'next monday 2pm' date -d 'today' # alternatively,...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

date formats the current date, or translates between date formats.

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'