Skip to content
Permalink
Browse files

Fix: Datetime:getFirstDayOfWeek, Datetime:getLastDayOfWeek. Methods n…

…ow returns first/last day of week instead of first/last day of month.
  • Loading branch information
DominikVisek authored and f3l1x committed Oct 7, 2019
1 parent ea5ee74 commit c79a75453cd95d2b1c03b77bce4d62c37312ad2c
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/DateTime.php
@@ -139,7 +139,7 @@ public static function create(array $args): self
*/
public function getFirstDayOfWeek(): self
{
return $this->modifyClone('first day of this week')
return $this->modifyClone('this week')
->setZeroTime();
}

@@ -148,7 +148,7 @@ public function getFirstDayOfWeek(): self
*/
public function getLastDayOfWeek(): self
{
return $this->modifyClone('last day of this week')
return $this->modifyClone('this week +6 days')
->setMidnight();
}

0 comments on commit c79a754

Please sign in to comment.
You can’t perform that action at this time.