Skip to content

Commit 1d48e38

Browse files
committed
[fix] bug fix of logic
1 parent fd4715a commit 1d48e38

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Jalalian.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ public function getFirstDayOfQuarter(): Jalalian
169169
{
170170
return new static(
171171
$this->getYear(),
172-
($this->getQuarter() - 1) * Carbon::MONTHS_PER_QUARTER,
172+
($this->getQuarter() - 1) * Carbon::MONTHS_PER_QUARTER + 1,
173173
1,
174174
$this->getHour(),
175175
$this->getMinute(),
@@ -180,7 +180,7 @@ public function getFirstDayOfQuarter(): Jalalian
180180

181181
public function getEndDayOfWeek(): Jalalian
182182
{
183-
$endWeek = $this->subDays(6 - $this->getDayOfWeek());
183+
$endWeek = $this->addDays(6 - $this->getDayOfWeek());
184184

185185
return (new static(
186186
$endWeek->getYear(),
@@ -211,7 +211,7 @@ public function getEndDayOfYear(): Jalalian
211211
return new static(
212212
$this->getYear(),
213213
12,
214-
$this->getDaysOf($this->getMonth()),
214+
$this->getDaysOf(12),
215215
$this->getHour(),
216216
$this->getMinute(),
217217
$this->getSecond(),

0 commit comments

Comments
 (0)