MCPcopy
hub / github.com/adobe/react-spectrum / getEraFormat

Function getEraFormat

packages/react-aria/src/calendar/utils.ts:41–43  ·  view source on GitHub ↗
(date: CalendarDate | undefined)

Source from the content-addressed store, hash-verified

39> = new WeakMap<CalendarState<CalendarSelectionMode> | RangeCalendarState, HookData>();
40
41export function getEraFormat(date: CalendarDate | undefined): 'short' | undefined {
42 return date?.calendar.identifier === 'gregory' && date.era === 'BC' ? 'short' : undefined;
43}
44
45export function useSelectedDateDescription(
46 state: CalendarState<'single' | 'multiple'> | RangeCalendarState

Callers 3

useCalendarCellFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected