summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/string
diff options
context:
space:
mode:
authorAntons Jeļkins <Antons.Jelkins@bmw.de>2021-07-21 13:52:45 (GMT)
committerAntons Jeļkins <Antons.Jelkins@bmw.de>2021-08-02 14:31:53 (GMT)
commitaafa392c12f6fe04893bc5327af429f5321fbb9d (patch)
treec91285a67da474d5e21ca96d025d2823fa8260ef /Tests/RunCMake/string
parenta915f691adbcac96bd5c3d421ef519900ee79c02 (diff)
downloadCMake-aafa392c12f6fe04893bc5327af429f5321fbb9d.zip
CMake-aafa392c12f6fe04893bc5327af429f5321fbb9d.tar.gz
CMake-aafa392c12f6fe04893bc5327af429f5321fbb9d.tar.bz2
string(TIMESTAMP): Add %V specifier for ISO 8601 week number
In ISO 8601 weeks begin with Monday. The first week of the year is the week which contains the first Thursday of the year.
Diffstat (limited to 'Tests/RunCMake/string')
-rw-r--r--Tests/RunCMake/string/Timestamp-stderr.txt2
-rw-r--r--Tests/RunCMake/string/Timestamp.cmake2
2 files changed, 2 insertions, 2 deletions
diff --git a/Tests/RunCMake/string/Timestamp-stderr.txt b/Tests/RunCMake/string/Timestamp-stderr.txt
index cd4dcb3..d54777b 100644
--- a/Tests/RunCMake/string/Timestamp-stderr.txt
+++ b/Tests/RunCMake/string/Timestamp-stderr.txt
@@ -1 +1 @@
-RESULT=2005-08-07 23:19:49 Sunday=Sun August=Aug 05 day=219 wd=0 week=32 %I=11 epoch=1123456789
+RESULT=2005-08-07 23:19:49 Sunday=Sun August=Aug 05 day=219 wd=0 week=32 w_iso=31 %I=11 epoch=1123456789
diff --git a/Tests/RunCMake/string/Timestamp.cmake b/Tests/RunCMake/string/Timestamp.cmake
index cba258d..7fd6d72 100644
--- a/Tests/RunCMake/string/Timestamp.cmake
+++ b/Tests/RunCMake/string/Timestamp.cmake
@@ -1,3 +1,3 @@
set(ENV{SOURCE_DATE_EPOCH} "1123456789")
-string(TIMESTAMP RESULT "%Y-%m-%d %H:%M:%S %A=%a %B=%b %y day=%j wd=%w week=%U %%I=%I epoch=%s" UTC)
+string(TIMESTAMP RESULT "%Y-%m-%d %H:%M:%S %A=%a %B=%b %y day=%j wd=%w week=%U w_iso=%V %%I=%I epoch=%s" UTC)
message("RESULT=${RESULT}")