1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-20 05:21:29 +02:00
This commit is contained in:
Ryan Cramer
2022-03-29 08:22:13 -04:00
parent 527f844403
commit 47f2742b72
2 changed files with 421 additions and 419 deletions

View File

@@ -170,9 +170,9 @@ class WireDateTime extends Wire {
if(empty($str)) return '';
// already a timestamp
if(ctype_digit(ltrim($str, '-'))) return (int) $str;
if(ctype_digit(ltrim("$str", '-'))) return (int) $str;
$format = trim($format);
$format = trim("$format");
if(!strlen($format)) return strtotime($str);
// use PHP 5.3's date parser if its available