MCPcopy Create free account
hub / github.com/UI5/webcomponents / getMinCalendarDate

Function getMinCalendarDate

packages/localization/src/dates/ExtremeDates.ts:6–18  ·  view source on GitHub ↗
(primaryCalendarType: `${CalendarType}`)

Source from the content-addressed store, hash-verified

4const cache = new Map<string, CalendarDate>();
5
6const getMinCalendarDate = (primaryCalendarType: `${CalendarType}`) => {
7 const key = `min ${primaryCalendarType}`;
8
9 if (!cache.has(key)) {
10 const minDate = new CalendarDate(1, 0, 1, primaryCalendarType);
11 minDate.setYear(1);
12 minDate.setMonth(0);
13 minDate.setDate(1);
14 cache.set(key, minDate);
15 }
16
17 return cache.get(key)!;
18};
19
20const getMaxCalendarDate = (primaryCalendarType: `${CalendarType}`) => {
21 const key = `max ${primaryCalendarType}`;

Callers 1

_minDateMethod · 0.85

Calls 4

setYearMethod · 0.95
setMonthMethod · 0.95
setDateMethod · 0.95
getMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…