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

Function maxDate

packages/@internationalized/date/src/queries.ts:363–372  ·  view source on GitHub ↗
(
  a?: A | null,
  b?: B | null
)

Source from the content-addressed store, hash-verified

361
362/** Returns the greater of the two provider dates. */
363export function maxDate<A extends DateValue, B extends DateValue>(
364 a?: A | null,
365 b?: B | null
366): A | B | null | undefined {
367 if (a && b) {
368 return a.compare(b) >= 0 ? a : b;
369 }
370
371 return a || b;
372}
373
374const WEEKEND_DATA = {
375 AF: [4, 5],

Callers 4

useRangeCalendarStateFunction · 0.90
constrainStartFunction · 0.90
constrainValueFunction · 0.90
queries.test.jsFile · 0.85

Calls 1

compareMethod · 0.45

Tested by

no test coverage detected