Skip to content

Commit

Permalink
Merge pull request #1512 from nextcloud/backport/1476/stable0.8
Browse files Browse the repository at this point in the history
[stable0.8] Fix "start of week" filter not working on table views
  • Loading branch information
enjeck authored Jan 4, 2025
2 parents d9c24f9 + b36d82a commit 14a1b03
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/Db/LegacyRowMapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ private function resolveSearchValue(string $unresolvedSearchValue, string $userI
case 'datetime-date-start-of-month': return date('Y-m-01') ? date('Y-m-01') : '';
case 'datetime-date-start-of-week':
$day = date('w');
$result = date('m-d-Y', strtotime('-'.$day.' days'));
$result = date('Y-m-d', strtotime('-'.$day.' days'));
return $result ?: '';
case 'datetime-time-now': return date('H:i');
case 'datetime-now': return date('Y-m-d H:i') ? date('Y-m-d H:i') : '';
Expand Down
2 changes: 1 addition & 1 deletion lib/Db/Row2Mapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,7 @@ private function resolveSearchValue(string $placeholder, string $userId): string
case 'datetime-date-start-of-month': return date('Y-m-01') ? date('Y-m-01') : '';
case 'datetime-date-start-of-week':
$day = date('w');
$result = date('m-d-Y', strtotime('-'.$day.' days'));
$result = date('Y-m-d', strtotime('-'.$day.' days'));
return $result ?: '';
case 'datetime-time-now': return date('H:i');
case 'datetime-now': return date('Y-m-d H:i') ? date('Y-m-d H:i') : '';
Expand Down

0 comments on commit 14a1b03

Please sign in to comment.