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

Function fromDate

packages/@internationalized/date/src/conversion.ts:254–256  ·  view source on GitHub ↗
(date: Date, timeZone: string)

Source from the content-addressed store, hash-verified

252 * Takes a `Date` object and converts it to the provided time zone.
253 */
254export function fromDate(date: Date, timeZone: string): ZonedDateTime {
255 return fromAbsolute(date.getTime(), timeZone);
256}
257
258/**
259 * Takes a `Date` object and converts it to the time zone identifier for the current user.

Callers 1

fromDateToLocalFunction · 0.85

Calls 1

fromAbsoluteFunction · 0.85

Tested by

no test coverage detected