mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-07-31 20:20:15 +02:00
merged from master
This commit is contained in:
@@ -12,8 +12,8 @@ class DateComparator implements ComparatorInterface
|
||||
*/
|
||||
public function compare($a, $b)
|
||||
{
|
||||
$aDate = strtotime($a['date']);
|
||||
$bDate = strtotime($b['date']);
|
||||
$aDate = new \DateTime($a['date']);
|
||||
$bDate = new \DateTime($b['date']);
|
||||
|
||||
if ($aDate == $bDate) {
|
||||
return 0;
|
||||
|
Reference in New Issue
Block a user