File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed
main/kotlin/com/woocommerce/android/ui/bookings/list
test/kotlin/com/woocommerce/android/ui/bookings/list Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,8 @@ class BookingListFiltersBuilder @Inject constructor(
1919 * See p1759398245019489-slack-C09FHQNQERG
2020 */
2121 fun BookingListTab.asDateRangeFilter (): BookingsFilterOption .DateRange ? {
22- fun todayAtMidnight () = LocalDate .now(clock).atTime(LocalTime .MIDNIGHT ).atOffset(ZoneOffset .UTC ).toInstant()
22+ fun todayAtMidnight () = LocalDate .now(clock).minusDays(1 ).atTime(LocalTime .MAX )
23+ .atOffset(ZoneOffset .UTC ).toInstant()
2324 fun todayAtEndOfDay () = LocalDate .now(clock).atTime(LocalTime .MAX ).atOffset(ZoneOffset .UTC ).toInstant()
2425
2526 return when (this ) {
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ class BookingListFilterBuilderTest {
2121 }
2222
2323 assertThat(filter).isNotNull()
24- assertThat(filter?.after).isEqualTo(Instant .parse(" 2025-01-01T00:00:00+00:00 " ))
24+ assertThat(filter?.after).isEqualTo(Instant .parse(" 2024-12-31T23:59:59.999999999Z " ))
2525 assertThat(filter?.before).isEqualTo(Instant .parse(" 2025-01-01T23:59:59.999999999+00:00" ))
2626 }
2727
You can’t perform that action at this time.
0 commit comments