Skip to content

Commit 22516ec

Browse files
committed
fixed overflow check
1 parent 9df28bf commit 22516ec

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/DateScopes.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public function scopeOfLastUnit(Builder $query, string $dateUnit, int $value, Da
3939
$startFunc = 'startOf'.ucfirst($dateUnit);
4040
$endFunc = 'endOf'.ucfirst($dateUnit);
4141

42-
$applyNoOverflow = (in_array($dateUnit, $this->fixedLengthDateUnits)) ? 'NoOverflow' : '' ;
42+
$applyNoOverflow = (! in_array($dateUnit, $this->fixedLengthDateUnits)) ? 'NoOverflow' : '' ;
4343
$subFunc = 'sub'.ucfirst($dateUnit).'s'.$applyNoOverflow;
4444

4545
$sub = ($dateUnit === 'second') ? 0 : 1;

0 commit comments

Comments
 (0)