[PATCH 3/3] date: add tests for European date formats
From:
Gabriel
Subject:
[PATCH 3/3] date: add tests for European date formats
Date:
Sun, 25 Jan 2026 22:28:04 +0100
User-agent:
Mozilla Thunderbird
I couldn't find tests for the US format, so I just added them here to
the other
more complex tests.
-- 8< --
* tests/date/date.pl: add tests for DAY.MONTH.YEAR and DAY.MONTH. formats
---
 tests/date/date.pl | 6 ++++++
 1 file changed, 6 insertions(+)
diff --git a/tests/date/date.pl b/tests/date/date.pl
index 8a5e573..5be0463 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',
--
2.43.0