Skip to content

Commit 3929b10

Browse files
committed
Add 'getLastMonth' method
1 parent d108327 commit 3929b10

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/Jalalian.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -673,6 +673,11 @@ public function getNextMonth(): Jalalian
673673
return $this->addMonths(1);
674674
}
675675

676+
public function getLastMonth(): Jalalian
677+
{
678+
return $this->subMonths(1);
679+
}
680+
676681
public function getWeekOfMonth(): int
677682
{
678683
return floor(($this->day + 5 - $this->getDayOfWeek()) / 7) + 1;

0 commit comments

Comments
 (0)