diff --git a/odpc.client/src/features/publicatie/PublicatiesOverview.vue b/odpc.client/src/features/publicatie/PublicatiesOverview.vue index 30f035d..b0a82be 100644 --- a/odpc.client/src/features/publicatie/PublicatiesOverview.vue +++ b/odpc.client/src/features/publicatie/PublicatiesOverview.vue @@ -161,20 +161,20 @@ const searchParamsConfig = { registratiedatumTot: "" }; +const dateOnlyFormat = new Intl.DateTimeFormat("sv-SE"); + const addDay = (v: string) => { if (!v) return v; const date = new Date(v); - return new Date(date.getFullYear(), date.getMonth(), date.getDate() + 2) - .toISOString() - .substring(0, 10); + const nextDate = new Date(date.getFullYear(), date.getMonth(), date.getDate() + 1); + return dateOnlyFormat.format(nextDate); }; const subtractDay = (v: string) => { if (!v) return v; const date = new Date(v); - return new Date(date.getFullYear(), date.getMonth(), date.getDate()) - .toISOString() - .substring(0, 10); + const previousDate = new Date(date.getFullYear(), date.getMonth(), date.getDate() - 1); + return dateOnlyFormat.format(previousDate); }; const { pagedResult, queryParams, pageCount, onNext, onPrev, isFetching, error } = usePagedSearch<