MCPcopy Create free account
hub / github.com/adobe/react-spectrum / zonedToDate

Function zonedToDate

packages/@internationalized/date/src/conversion.ts:375–378  ·  view source on GitHub ↗
(date: ZonedDateTime)

Source from the content-addressed store, hash-verified

373}
374
375export function zonedToDate(date: ZonedDateTime): Date {
376 let ms = epochFromDate(date) - date.offset;
377 return new Date(ms);
378}
379
380/** Converts a `ZonedDateTime` from one time zone to another. */
381export function toTimeZone(date: ZonedDateTime, timeZone: string): ZonedDateTime {

Callers 1

toDateMethod · 0.90

Calls 1

epochFromDateFunction · 0.85

Tested by

no test coverage detected