From eac020907afced2c33db53b564a80e4764dfe3b7 Mon Sep 17 00:00:00 2001 From: Urban Müller Date: Wed, 26 Mar 2025 15:18:32 +0100 Subject: allow 20241212 is second arg of it::date --- test/it.t | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'test') diff --git a/test/it.t b/test/it.t index 535f185..6ea1859 100755 --- a/test/it.t +++ b/test/it.t @@ -420,6 +420,10 @@ is(it::date('datetime', 1000000), it::date('datetime', "1000000"), '... large nu is(it::date('datetime', 1000000.543), it::date('datetime', "1000000"), '... large nummer and point'); is(it::date('time', "10.5"), "10:05", 'interpret string with points with strtotime'); is(it::date('time', "10.05"), "10:05", 'interpret string with points with strtotime'); +is(it::date('Y-m-d', "20000101"), '2000-01-01', 'interpret 8 digit strings as dates'); +is(it::date('Y-m-d', 20000101), '2000-01-01', 'interpret 8 numbers strings as dates'); +is(it::date('Y-m-d', "20990101"), '2099-01-01', 'interpret 8 digit strings as dates'); +is(it::date('Y-m-d', strtotime("1980-01-01")), '1980-01-01', 'interpret typical time stamps correctly'); # it::uc* is(it::ucfirst('foo bär über'), 'Foo bär über'); -- cgit v1.2.3