diff --git a/docs/en/index.html b/docs/en/index.html index ddbef7b..17de816 100644 --- a/docs/en/index.html +++ b/docs/en/index.html @@ -1,5 +1,6 @@ + Verta — Laravel plugin Jalali datetime @@ -9,58 +10,62 @@ - -Fork me on GitHub - -
-
-
- -
-
- 2017-2021 © -
-
+
+
+ 2017-2021 © +
+
+ diff --git a/docs/index.html b/docs/index.html index c4429c1..138f60d 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1,71 +1,76 @@ + -Verta — پکیج تاریخ شمسی در لاراول - - - - - - - + Verta — پکیج تاریخ شمسی در لاراول + + + + + + + + -Fork me on GitHub - + Fork me on GitHub + -
-
-
- + +
+
+
-
-
- 2017-2021 © -
+
+
+ 2017-2021 © +
-
+
+ diff --git a/tests/BoundariesTest.php b/tests/BoundariesTest.php new file mode 100644 index 0000000..e4f21c5 --- /dev/null +++ b/tests/BoundariesTest.php @@ -0,0 +1,46 @@ +startMinute()->format('Y-m-d H:i:s'); + $this->assertEquals('1398-10-10 21:30:00', $result); + $this->assertEquals(1577827800, $datetime->timestamp); + } + + /** @test */ + public function endMinute() + { + $datetime = Verta::parse('1398-10-10 21:30:00'); + $result = $datetime->endMinute()->format('Y-m-d H:i:s'); + $this->assertEquals('1398-10-10 21:30:59', $result); + $this->assertEquals(1577827859, $datetime->timestamp); + } + + /** @test */ + public function startHour() + { + $datetime = Verta::parse('1398-10-10 21:30:59'); + $result = $datetime->startHour()->format('Y-m-d H:i:s'); + $this->assertEquals('1398-10-10 21:00:00', $result); + $this->assertEquals(1577826000, $datetime->timestamp); + } + + /** @test */ + public function endHour() + { + $datetime = Verta::parse('1398-10-10 21:30:59'); + $result = $datetime->endHour()->format('Y-m-d H:i:s'); + $this->assertEquals('1398-10-10 21:59:59', $result); + $this->assertEquals(1577829599, $datetime->timestamp); + } +}