MCPcopy Create free account
hub / github.com/dfinity/orbit / dateWithoutTimezone

Function dateWithoutTimezone

apps/wallet/src/utils/date.utils.ts:1–3  ·  view source on GitHub ↗
(date: Date)

Source from the content-addressed store, hash-verified

1export const dateWithoutTimezone = (date: Date): Date => {
2 return new Date(date.getTime() - date.getTimezoneOffset() * 60000);
3};
4
5export const startOfDay = (date: Date): Date => {
6 const dt = new Date(dateWithoutTimezone(date).getTime());

Callers 3

startOfDayFunction · 0.85
endOfDayFunction · 0.85
convertDateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected