From: Gabriel Date: Sun, 8 Feb 2026 16:01:44 +0000 (+0000) Subject: date: add tests and NEWS for dd.mm.yy support X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e2c7db6c708303158f57f8ae2cf908c3b3ad2cd0;p=thirdparty%2Fcoreutils.git date: add tests and NEWS for dd.mm.yy support * NEWS: Mention the new feature. * tests/date/date.pl: Add test cases. --- diff --git a/NEWS b/NEWS index a696b636f6..2af46eac30 100644 --- 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 diff --git a/tests/date/date.pl b/tests/date/date.pl index 8a5e57363f..5be04637c8 100755 --- a/tests/date/date.pl +++ b/tests/date/date.pl @@ -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',