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

Function toTime

packages/@internationalized/date/src/conversion.ts:333–335  ·  view source on GitHub ↗
(dateTime: CalendarDateTime | ZonedDateTime)

Source from the content-addressed store, hash-verified

331
332/** Extracts the time components from a value containing a date and time. */
333export function toTime(dateTime: CalendarDateTime | ZonedDateTime): Time {
334 return new Time(dateTime.hour, dateTime.minute, dateTime.second, dateTime.millisecond);
335}
336
337/** Converts a date from one calendar system to another. */
338export function toCalendar<T extends AnyCalendarDate>(date: T, calendar: Calendar): T {

Callers 3

useTimeFieldStateFunction · 0.90
onChangeFunction · 0.90
conversion.test.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected