diff options
author | Brad King <brad.king@kitware.com> | 2021-08-03 15:08:20 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2021-08-03 15:08:34 (GMT) |
commit | 70daea512de87d1757aa926ad6b6369e7ccc6c13 (patch) | |
tree | fae6eb78c4a3d68634c42f70637d7189105ab8eb /Help | |
parent | a3ddcdb9111f81771dc2c06d88de84fc1cf00e00 (diff) | |
parent | aafa392c12f6fe04893bc5327af429f5321fbb9d (diff) | |
download | CMake-70daea512de87d1757aa926ad6b6369e7ccc6c13.zip CMake-70daea512de87d1757aa926ad6b6369e7ccc6c13.tar.gz CMake-70daea512de87d1757aa926ad6b6369e7ccc6c13.tar.bz2 |
Merge topic 'string-TIMESTAMP-specifier-V'
aafa392c12 string(TIMESTAMP): Add %V specifier for ISO 8601 week number
a915f691ad Help: Format string(TIMESTAMP) format specifiers as a definition list
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6374
Diffstat (limited to 'Help')
-rw-r--r-- | Help/command/string.rst | 91 | ||||
-rw-r--r-- | Help/release/dev/string-TIMESTAMP-specifier-V.rst | 5 |
2 files changed, 68 insertions, 28 deletions
diff --git a/Help/command/string.rst b/Help/command/string.rst index 8ad0089..29ad082 100644 --- a/Help/command/string.rst +++ b/Help/command/string.rst @@ -449,38 +449,73 @@ be in Coordinated Universal Time (UTC) rather than local time. The optional ``<format_string>`` may contain the following format specifiers: -:: +``%%`` + .. versionadded:: 3.8 - %% A literal percent sign (%). - %d The day of the current month (01-31). - %H The hour on a 24-hour clock (00-23). - %I The hour on a 12-hour clock (01-12). - %j The day of the current year (001-366). - %m The month of the current year (01-12). - %b Abbreviated month name (e.g. Oct). - %B Full month name (e.g. October). - %M The minute of the current hour (00-59). - %s Seconds since midnight (UTC) 1-Jan-1970 (UNIX time). - %S The second of the current minute. - 60 represents a leap second. (00-60) - %U The week number of the current year (00-53). - %w The day of the current week. 0 is Sunday. (0-6) - %a Abbreviated weekday name (e.g. Fri). - %A Full weekday name (e.g. Friday). - %y The last two digits of the current year (00-99) - %Y The current year. - -.. versionadded:: 3.6 - ``%s`` format specifier (UNIX time). + A literal percent sign (%). -.. versionadded:: 3.7 - ``%a`` and ``%b`` format specifiers (abbreviated month and weekday names). +``%d`` + The day of the current month (01-31). -.. versionadded:: 3.8 - ``%%`` specifier (literal ``%``). +``%H`` + The hour on a 24-hour clock (00-23). -.. versionadded:: 3.7 - ``%A`` and ``%B`` format specifiers (full month and weekday names). +``%I`` + The hour on a 12-hour clock (01-12). + +``%j`` + The day of the current year (001-366). + +``%m`` + The month of the current year (01-12). + +``%b`` + .. versionadded:: 3.7 + + Abbreviated month name (e.g. Oct). + +``%B`` + .. versionadded:: 3.10 + + Full month name (e.g. October). + +``%M`` + The minute of the current hour (00-59). + +``%s`` + .. versionadded:: 3.6 + + Seconds since midnight (UTC) 1-Jan-1970 (UNIX time). + +``%S`` + The second of the current minute. 60 represents a leap second. (00-60) + +``%U`` + The week number of the current year (00-53). + +``%V`` + .. versionadded:: 3.22 + + The ISO 8601 week number of the current year (01-53). + +``%w`` + The day of the current week. 0 is Sunday. (0-6) + +``%a`` + .. versionadded:: 3.7 + + Abbreviated weekday name (e.g. Fri). + +``%A`` + .. versionadded:: 3.10 + + Full weekday name (e.g. Friday). + +``%y`` + The last two digits of the current year (00-99). + +``%Y`` + The current year. Unknown format specifiers will be ignored and copied to the output as-is. diff --git a/Help/release/dev/string-TIMESTAMP-specifier-V.rst b/Help/release/dev/string-TIMESTAMP-specifier-V.rst new file mode 100644 index 0000000..afd3f03 --- /dev/null +++ b/Help/release/dev/string-TIMESTAMP-specifier-V.rst @@ -0,0 +1,5 @@ +string-TIMESTAMP-specifier-V +---------------------------- + +* The :command:`string(TIMESTAMP)` command now supports the ``%V`` + specifier for ISO 8601 week numbers. |