note 44941 deleted from function.strtotime by tomsommer
| From: | tomsommer@php.net | Date: | Fri, 20 Aug 2004 18:06:16 +0000 |
| Subject: | note 44941 deleted from function.strtotime by tomsommer | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-75007@lists.php.net to get a copy of this message | ||
Note Submitter: tim at komta dot com
----
I fixed the regex to that it will have the year optionally, instead of required, since this is
allowable behavior for strtotime()
<?php
$your_value ( preg_replace ('#^(\d{1,2}/\d{1,2}/?(\d{2,4})? )(00)(\d{2})$#',
'$1$3:$4', $your_value() ));
?>