Basic date compare fix

The date compare now uses correct preg_split for splitting with - and /
as date separators
This commit is contained in:
Clemens Schwaighofer
2017-04-03 17:52:49 +09:00
parent e1255e0872
commit 6606f30ceb
2 changed files with 7 additions and 2 deletions

View File

@@ -1239,8 +1239,8 @@
return FALSE;
// splits the data up with / or -
list ($start_year, $start_month, $start_day) = explode('[/-]', $start_date);
list ($end_year, $end_month, $end_day) = explode('[/-]', $end_date);
list ($start_year, $start_month, $start_day) = preg_split('/[\/-]/', $start_date);
list ($end_year, $end_month, $end_day) = preg_split('/[\/-]/', $end_date);
// check that month & day are two digits and then combine
foreach (array('start', 'end') as $prefix)
{