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

Function toDate

packages/@internationalized/date/src/conversion.ts:215–221  ·  view source on GitHub ↗
(
  dateTime: CalendarDate | CalendarDateTime,
  timeZone: string,
  disambiguation: Disambiguation = 'compatible'
)

Source from the content-addressed store, hash-verified

213}
214
215export function toDate(
216 dateTime: CalendarDate | CalendarDateTime,
217 timeZone: string,
218 disambiguation: Disambiguation = 'compatible'
219): Date {
220 return new Date(toAbsolute(dateTime, timeZone, disambiguation));
221}
222
223/**
224 * Takes a Unix epoch (milliseconds since 1970) and converts it to the provided time zone.

Callers 3

toDateMethod · 0.90
toDateMethod · 0.90
conversion.test.jsFile · 0.90

Calls 1

toAbsoluteFunction · 0.85

Tested by

no test coverage detected