Skip to content

Commit

Permalink
minutes ago and years ago should remain ints
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonvarga committed Feb 20, 2025
1 parent 11dad31 commit 76057a3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Modifiers/CoreModifiers.php
Original file line number Diff line number Diff line change
Expand Up @@ -1617,7 +1617,7 @@ public function md5($value)
*/
public function minutesAgo($value, $params)
{
return $this->carbon($value)->diffInMinutes(Arr::get($params, 0));
return (int) $this->carbon($value)->diffInMinutes(Arr::get($params, 0));
}

/**
Expand Down Expand Up @@ -3045,7 +3045,7 @@ public function wordCount($value)
*/
public function yearsAgo($value, $params)
{
return $this->carbon($value)->diffInYears(Arr::get($params, 0));
return (int) $this->carbon($value)->diffInYears(Arr::get($params, 0));
}

/**
Expand Down

0 comments on commit 76057a3

Please sign in to comment.