Skip to content

Commit

Permalink
test: add test case to proof the package support date conversion afte…
Browse files Browse the repository at this point in the history
…r 1416
  • Loading branch information
morilog committed Aug 7, 2022
1 parent a0e7925 commit 1b0d8f0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/CalendarUtilsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,10 @@ public function testCreateCarbonFormFormat()
$jalaiDateTimeFormatted = Jalalian::fromDateTime($carbon->toDateTimeString())->format('Y-m-d H:i:s');
$this->assertFalse($jalaiDateFormatted === '1394-11-25 15:00:00');
$this->assertTrue($jalaiDateTimeFormatted === '1394-11-25 15:00:00');

// Test support years after 1416
$carbon = CalendarUtils::createCarbonFromFormat('Y/m/d', '1417/10/11');
$this->assertEquals('2039-01-01', $carbon->format('Y-m-d'));
}

public function testTimezone()
Expand Down

0 comments on commit 1b0d8f0

Please sign in to comment.