mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-04-24 00:22:07 +02:00
date: add week number example and other tweaks (#9136)
This commit is contained in:
parent
053c5bf1e8
commit
31cc8392a6
1 changed files with 10 additions and 6 deletions
|
@ -5,21 +5,21 @@
|
||||||
|
|
||||||
- Display the current date using the default locale's format:
|
- 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):
|
- Display the current date as a Unix timestamp (seconds since the Unix epoch):
|
||||||
|
|
||||||
`date +%s`
|
`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`
|
`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):
|
- Set the current date using the format `MMDDhhmmYYYY.ss` (`YYYY` and `.ss` are optional):
|
||||||
|
|
||||||
`date {{093023592021.59}}`
|
`date {{093023592021.59}}`
|
||||||
|
|
||||||
|
- Display the current ISO week number:
|
||||||
|
|
||||||
|
`date +%V`
|
||||||
|
|
Loading…
Add table
Reference in a new issue