From 8e9e73f71512c7f571daab3c3172fbc0451a32cb Mon Sep 17 00:00:00 2001 From: Marcus Comstedt <marcus@mc.pp.se> Date: Thu, 22 Oct 2020 22:12:11 +0200 Subject: [PATCH] strftime: Remove non-standard conversions %k and %l from doc and testsuite These are not part of any C standard, not even C2x. Thus libc can not be expected to implement them. --- src/builtin.cmod | 8 -------- src/modules/system/testsuite.in | 4 ++-- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/src/builtin.cmod b/src/builtin.cmod index 73b6b130cc..4deb5e5098 100644 --- a/src/builtin.cmod +++ b/src/builtin.cmod @@ -270,14 +270,6 @@ PIKECLASS TM *! @item %j *! The day of the year as a decimal number (range 001 to 366). *! - *! @item %k - *! The hour (24-hour clock) as a decimal number (range 0 to 23); - *! single digits are preceded by a blank. (See also @expr{%H@}.) - *! - *! @item %l - *! The hour (12-hour clock) as a decimal number (range 1 to 12); - *! single digits are preceded by a blank. (See also @expr{%I@}.) - *! *! @item %m *! The month as a decimal number (range 01 to 12). *! diff --git a/src/modules/system/testsuite.in b/src/modules/system/testsuite.in index 43e96cd0d8..d020d4e328 100644 --- a/src/modules/system/testsuite.in +++ b/src/modules/system/testsuite.in @@ -304,10 +304,10 @@ test_eq(intp(System.TM(1513871300)->gmtoff), 1) test_eq(stringp(System.TM(1513871300)->zone), 1) test_eq(stringp(System.TM(1513871300)->asctime()), 1) test_eq(System.TM(1513871300)->unix_time(), 1513871300) -test_equal(map("%d%D%e%G%g%H%I%k%l%M%m%p%r%R%T%u%U%V%w"/2, +test_equal(map("%d%D%e%G%g%H%I%M%m%p%r%R%T%u%U%V%w"/2, System.TM(1513871300)->strftime), ({ "21", "12/21/17", "21", "2017", "17", - "15", "03", "15", " 3", "48", "12", "PM", + "15", "03", "48", "12", "PM", "03:48:20 PM", "15:48", "15:48:20", "4", "51", "51", "4" })) test_eq(stringp((string)System.TM(1513871300)), 1) -- GitLab