MCPcopy
hub / github.com/date-fns/date-fns / fromTp

Function fromTp

pkgs/core/src/_lib/tp/index.ts:37–46  ·  view source on GitHub ↗
(
  temporal: Temporal.ZonedDateTime,
  date: DateArg<DateType>,
  options?: ContextOptions<ResultDate> | undefined,
)

Source from the content-addressed store, hash-verified

35}
36
37export function fromTp<
38 DateType extends Date,
39 ResultDate extends Date = DateType,
40>(
41 temporal: Temporal.ZonedDateTime,
42 date: DateArg<DateType>,
43 options?: ContextOptions<ResultDate> | undefined,
44): ResultDate {
45 return constructFrom(options?.in || date, temporal.epochMilliseconds);
46}
47
48function invalidDate<DateType extends Date, ResultDate extends Date = DateType>(
49 date: DateArg<DateType>,

Callers 2

tpyAddDaysFunction · 0.90
tpyAddFunction · 0.90

Calls 1

constructFromFunction · 0.90

Tested by

no test coverage detected