Skip to content

Commit

Permalink
Merge pull request #24 from mageplaza/2.4-develop
Browse files Browse the repository at this point in the history
2.4 develop
  • Loading branch information
chuccv authored May 31, 2024
2 parents af98379 + b0d33e5 commit eefb2e0
Show file tree
Hide file tree
Showing 9 changed files with 977 additions and 38 deletions.
8 changes: 5 additions & 3 deletions Block/Widget/Grid/Column/Renderer/Time.php
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,15 @@ protected function timeElapsedString($datetime, $full = false)
$ago = new DateTime($datetime);
$diff = $now->diff($ago);

$diff->w = floor($diff->d / 7);
$diff->d -= $diff->w * 7;
if ($diff->d >= 7) {
$diff->w = floor($diff->d / 7);
$diff->d -= $diff->w * 7;
$string[] = ['w' => 'week'];
}

$string = [
'y' => 'year',
'm' => 'month',
'w' => 'week',
'd' => 'day',
'h' => 'hour',
'i' => 'minute',
Expand Down
Loading

0 comments on commit eefb2e0

Please sign in to comment.