From e5aac2298465e3b78398af5b17198bc527ca3d33 Mon Sep 17 00:00:00 2001 From: Christian Helbling Date: Tue, 7 Feb 2017 16:54:52 +0100 Subject: allow .time-1527 and .time-152715 as time formats for time debug parameter, add more tests for it::time() --- it.class | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'it.class') diff --git a/it.class b/it.class index 34f0bf6..55d57db 100644 --- a/it.class +++ b/it.class @@ -901,7 +901,7 @@ static function gets() */ static function time() { - return ($t = EDC('time')) ? strtotime(rtrim(it::replace(array('(\d\d\d\d)-(\d\d)-(\d\d)-(\d\d)-(\d\d)(-(\d\d))?' => '$1-$2-$3 $4:$5:$7', '^(\d\d)-(\d\d)(-(\d\d))?' => 'today $1:$2:$4'), $t), ":")) : time(); + return ($t = EDC('time')) ? strtotime(rtrim(it::replace(array('(\d\d\d\d)-(\d\d)-(\d\d)-(\d\d)-(\d\d)(-(\d\d))?' => '$1-$2-$3 $4:$5:$7', '^(\d\d)-?(\d\d)(-?(\d\d))?$' => 'today $1:$2:$4'), $t), ":")) : time(); } /** -- cgit v1.2.3