Skip to content

Commit

Permalink
feedback: fix date format
Browse files Browse the repository at this point in the history
  • Loading branch information
felixcicatt committed Dec 16, 2024
1 parent f21a03c commit cf5a0e8
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions odpc.client/src/features/publicatie/PublicatiesOverview.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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<
Expand Down

0 comments on commit cf5a0e8

Please sign in to comment.