Skip to content

Commit

Permalink
Add 'today' to RelativeKeywords
Browse files Browse the repository at this point in the history
  • Loading branch information
Justin Roman committed Mar 16, 2016
1 parent ecc98cd commit b8bf84f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/Carbon/Carbon.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ class Carbon extends DateTime
'next',
'last',
'tomorrow',
'today',
'yesterday',
'+',
'-',
Expand Down
1 change: 1 addition & 0 deletions tests/Carbon/TestingAidsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ public function testParseRelativeWithTestValueSet()
$scope->assertSame('2013-08-25 05:15:05', Carbon::parse('1 week ago')->toDateTimeString());

$scope->assertSame('2013-09-02 00:00:00', Carbon::parse('tomorrow')->toDateTimeString());
$scope->assertSame('2013-09-01 00:00:00', Carbon::parse('today')->toDateTimeString());
$scope->assertSame('2013-08-31 00:00:00', Carbon::parse('yesterday')->toDateTimeString());

$scope->assertSame('2013-09-02 05:15:05', Carbon::parse('+1 day')->toDateTimeString());
Expand Down

0 comments on commit b8bf84f

Please sign in to comment.