]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
date: add tests and NEWS for dd.mm.yy support
authorGabriel <gnu@gabriels.cloud>
Sun, 8 Feb 2026 16:01:44 +0000 (16:01 +0000)
committerPádraig Brady <P@draigBrady.com>
Sun, 8 Feb 2026 16:25:44 +0000 (16:25 +0000)
* NEWS: Mention the new feature.
* tests/date/date.pl: Add test cases.

NEWS
tests/date/date.pl

diff --git a/NEWS b/NEWS
index a696b636f64259f83669285a0fa14215a536e631..2af46eac303c112f08be72933fdb18ad9cd64b7c 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -7,6 +7,11 @@ GNU coreutils NEWS                                    -*- outline -*-
   'kill --help' now has links to valid anchors in the html manual.
   [bug introduced in coreutils-9.10]
 
+** New Features
+
+  'date --date' now parses dot delimited dd.mm.yy format common in Europe.
+  This is in addition to the already supported mm/dd/yy and yy-mm-dd formats.
+
 ** Build-related
 
   ./configure --enable-single-binary=hardlinks is now supported on systems
index 8a5e57363faf6ddc638195ffa49d9bdb2e1ce58a..5be04637c811da738cd248c752f5e3352d759425 100755 (executable)
@@ -196,6 +196,12 @@ my @Tests =
      ['moname-d-y', '--iso -d May-23-2003', {OUT=>"2003-05-23"}],
      ['moname-d-y-r', '--rfc-3339=date -d May-23-2003', {OUT=>"2003-05-23"}],
 
+     # Ensure we can parse DAY.MONTH.YEAR and its short form DAY.MONTH.
+     ['european-0', "-I -d '24.01.2026'", {OUT=>"2026-01-24"}],
+     ['european-1', "-I -d '24.1.2026'", {OUT=>"2026-01-24"}],
+     ['european-2', "-d '24.01.' +%m-%d", {OUT=>"01-24"}],
+     ['european-3', "-d '1.2.' +%m-%d", {OUT=>"02-01"}],
+
      ['epoch', '--iso=sec -d @31536000',
       {OUT=>"1971-01-01T00:00:00+00:00"}],
      ['epoch-r', '--rfc-3339=sec -d @31536000',