From be7ada5c5698cc12fc4b887fc12a79e498e35912 Mon Sep 17 00:00:00 2001 From: Kaley Date: Mon, 25 Nov 2024 20:27:37 +0100 Subject: [PATCH 1/2] Fix "start of week" filter not working on table views Signed-off-by: Kaley --- lib/Db/Row2Mapper.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Db/Row2Mapper.php b/lib/Db/Row2Mapper.php index a3a80ec090..2cabb62a39 100644 --- a/lib/Db/Row2Mapper.php +++ b/lib/Db/Row2Mapper.php @@ -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') : ''; From 6311a36a4c46a88bd1f216565ccc82c5bc2a29a7 Mon Sep 17 00:00:00 2001 From: Kaley Date: Tue, 26 Nov 2024 21:03:01 +0100 Subject: [PATCH 2/2] Update LegacyRowMapper.php Signed-off-by: Kaley --- lib/Db/LegacyRowMapper.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Db/LegacyRowMapper.php b/lib/Db/LegacyRowMapper.php index 7e2c351823..3ee7089baa 100644 --- a/lib/Db/LegacyRowMapper.php +++ b/lib/Db/LegacyRowMapper.php @@ -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') : '';