Changed DateParser to use only user format and ISO-8601

This commit is contained in:
Frederic Guillot
2016-06-05 21:28:56 -04:00
parent 33098e4e11
commit 656f430632
9 changed files with 154 additions and 35 deletions

View File

@@ -312,7 +312,7 @@ class TaskCreationTest extends Base
$this->assertEquals('2014-11-24 16:25', date('Y-m-d H:i', $task['date_started']));
// Set a datetime
$this->assertEquals(3, $tc->create(array('project_id' => 1, 'title' => 'test', 'date_started' => '2014-11-24 6:25pm')));
$this->assertEquals(3, $tc->create(array('project_id' => 1, 'title' => 'test', 'date_started' => '11/24/2014 18:25')));
$task = $tf->getById(3);
$this->assertEquals('2014-11-24 18:25', date('Y-m-d H:i', $task['date_started']));

View File

@@ -231,7 +231,7 @@ class TaskModificationTest extends Base
$this->assertEquals('2014-11-24 16:25', date('Y-m-d H:i', $task['date_started']));
// Set a datetime
$this->assertTrue($tm->update(array('id' => 1, 'date_started' => '2014-11-24 6:25pm')));
$this->assertTrue($tm->update(array('id' => 1, 'date_started' => '11/24/2014 18:25')));
$task = $tf->getById(1);
$this->assertEquals('2014-11-24 18:25', date('Y-m-d H:i', $task['date_started']));