diff --git a/pages/common/date.md b/pages/common/date.md index 7e716fe77d..797c6725e4 100644 --- a/pages/common/date.md +++ b/pages/common/date.md @@ -5,21 +5,21 @@ - Display the current date using the default locale's format: -`date +"%c"` +`date +%c` -- Display the current date in UTC and ISO 8601 format: +- Display the current date in UTC, using the ISO 8601 format: -`date -u +"%Y-%m-%dT%H:%M:%SZ"` +`date -u +%Y-%m-%dT%H:%M:%SZ` - Display the current date as a Unix timestamp (seconds since the Unix epoch): `date +%s` -- Display a specific date (represented as a Unix timestamp) using the default format: +- Convert a date specified as a Unix timestamp to the default format: -`date -d @1473305798` +`date -d @{{1473305798}}` -- Convert a specific date to the Unix timestamp format: +- Convert a given date to the Unix timestamp format: `date -d "{{2018-09-01 00:00}}" +%s --utc` @@ -30,3 +30,7 @@ - Set the current date using the format `MMDDhhmmYYYY.ss` (`YYYY` and `.ss` are optional): `date {{093023592021.59}}` + +- Display the current ISO week number: + +`date +%V`