Skip to content

Commit

Permalink
Merge pull request #83 from tegonal/renovate/date-fns-4.x
Browse files Browse the repository at this point in the history
Update dependency date-fns to v4
  • Loading branch information
toggm authored Dec 4, 2024
2 parents 9fafa39 + 3529e6e commit 6d8bba0
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 13 deletions.
4 changes: 2 additions & 2 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@
"@theme-ui/match-media": "^0.17.0",
"axios": "^1.7.4",
"boring-avatars": "^1.10.2",
"date-fns": "^2.30.0",
"date-fns-tz": "^2.0.1",
"date-fns": "^4.0.0",
"date-fns-tz": "^3.2.0",
"framer-motion": "^11.3.29",
"i18next": "^24.0.0",
"js-cookie": "^3.0.5",
Expand Down
6 changes: 3 additions & 3 deletions frontend/src/lib/api/apiDateHandling.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import {
startOfMonth,
startOfWeek,
} from 'date-fns';
import { utcToZonedTime, zonedTimeToUtc } from 'date-fns-tz';
import { toZonedTime, fromZonedTime } from 'date-fns-tz';
import { ModelsLocalDateTimeWithTimeZone } from 'lib/api/lasius';
import { Granularity } from 'types/common';

Expand Down Expand Up @@ -125,7 +125,7 @@ export const modelsLocalDateTimeWithTimeZoneToString = (
m: ModelsLocalDateTimeWithTimeZone
): string => {
const isoDate = parseISO(m.dateTime);
const asUtc = zonedTimeToUtc(isoDate, m.zone);
const zoned = utcToZonedTime(asUtc, m.zone);
const asUtc = fromZonedTime(isoDate, m.zone);
const zoned = toZonedTime(asUtc, m.zone);
return zoned.toISOString();
};
23 changes: 15 additions & 8 deletions frontend/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5646,16 +5646,16 @@ __metadata:
languageName: node
linkType: hard

"date-fns-tz@npm:^2.0.1":
version: 2.0.1
resolution: "date-fns-tz@npm:2.0.1"
"date-fns-tz@npm:^3.2.0":
version: 3.2.0
resolution: "date-fns-tz@npm:3.2.0"
peerDependencies:
date-fns: 2.x
checksum: 10/f12e684bc13c9fe7ef7910c5b25437e15290a655d45102b7420f046cecdf9fa5715bf333d6dfb6bab6c382c7abc6b58241a50c216e9ab0b60d6fdb388f473d6b
date-fns: ^3.0.0 || ^4.0.0
checksum: 10/8ab4745f00b40381220f0a7a2ec16e217cb629d4018a19047264d289dd260322baa23e19b3ed63c7e553f9ad34bea9dea105391132930a3e141e9a0a53e54af2
languageName: node
linkType: hard

"date-fns@npm:^2.16.1, date-fns@npm:^2.30.0":
"date-fns@npm:^2.16.1":
version: 2.30.0
resolution: "date-fns@npm:2.30.0"
dependencies:
Expand All @@ -5664,6 +5664,13 @@ __metadata:
languageName: node
linkType: hard

"date-fns@npm:^4.0.0":
version: 4.1.0
resolution: "date-fns@npm:4.1.0"
checksum: 10/d5f6e9de5bbc52310f786099e18609289ed5e30af60a71e0646784c8185ddd1d0eebcf7c96b7faaaefc4a8366f3a3a4244d099b6d0866ee2bec80d1361e64342
languageName: node
linkType: hard

"debounce@npm:^1.2.1":
version: 1.2.1
resolution: "debounce@npm:1.2.1"
Expand Down Expand Up @@ -8562,8 +8569,8 @@ __metadata:
axios: "npm:^1.7.4"
boring-avatars: "npm:^1.10.2"
concurrently: "npm:^9.0.0"
date-fns: "npm:^2.30.0"
date-fns-tz: "npm:^2.0.1"
date-fns: "npm:^4.0.0"
date-fns-tz: "npm:^3.2.0"
eslint: "npm:9.16.0"
eslint-config-airbnb: "npm:^19.0.4"
eslint-config-next: "npm:^15.0.0"
Expand Down

0 comments on commit 6d8bba0

Please sign in to comment.