summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorPádraig Brady <P@draigBrady.com>2016-10-19 14:57:57 -0700
committerPádraig Brady <P@draigBrady.com>2016-11-07 17:09:15 +0000
commit30012b290facf66551cdf395ace397903d00483d (patch)
tree6fcc03436b7a10a2002ce03d9573689218d5e55c /tests
parent7ba9355d0aec01a005164b02f7bdc8e67c430315 (diff)
downloadcoreutils-30012b290facf66551cdf395ace397903d00483d.tar.xz
date: add %q to output the quarter of the year
* doc/coreutils.texi (date invocation): Document %q. * src/date.c (usage): Likewise. * tests/misc/date.pl: Add a test case. * cfg.mk (sc_strftime_check): Adjust to allow %q. * NEWS: Mention the new feature.
Diffstat (limited to 'tests')
-rwxr-xr-xtests/misc/date.pl5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/misc/date.pl b/tests/misc/date.pl
index 4449a48e4..b53ca81f9 100755
--- a/tests/misc/date.pl
+++ b/tests/misc/date.pl
@@ -86,6 +86,11 @@ my @Tests =
['W92-2', "--date '1992-1-5' +%W", {OUT=>"00"}],
['W92-3', "--date '1992-1-6' +%W", {OUT=>"01"}],
+ ['q-1', "--date '1000-1-1' +%q", {OUT=>"1"}],
+ ['q-2', "--date '1000-4-1' +%q", {OUT=>"2"}],
+ ['q-3', "--date '1000-7-1' +%q", {OUT=>"3"}],
+ ['q-4', "--date '1000-10-1' +%q", {OUT=>"4"}],
+
['millen-1', "--date '1998-1-1 3 years' +%Y", {OUT=>"2001"}],
['rel-0', "-d '$d1 now' '+%Y-%m-%d %T'", {OUT=>"$d0 $t0"}],