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

Function getMaxCalendarDate

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

Source from the content-addressed store, hash-verified

18};
19
20const getMaxCalendarDate = (primaryCalendarType: `${CalendarType}`) => {
21 const key = `max ${primaryCalendarType}`;
22
23 if (!cache.has(key)) {
24 const maxDate = new CalendarDate(1, 0, 1, primaryCalendarType);
25 maxDate.setYear(9999);
26 maxDate.setMonth(11);
27 const tempDate = new CalendarDate(maxDate, primaryCalendarType);
28 tempDate.setDate(1);
29 tempDate.setMonth(tempDate.getMonth() + 1, 0);
30 maxDate.setDate(tempDate.getDate());// 31st for Gregorian Calendar
31 cache.set(key, maxDate);
32 }
33
34 return cache.get(key)!;
35};
36
37export {
38 getMinCalendarDate,

Callers 3

_maxDateMethod · 0.85
_currentYearRangeMethod · 0.85
_getGridStartYearMethod · 0.85

Calls 6

setYearMethod · 0.95
setMonthMethod · 0.95
setDateMethod · 0.95
getMonthMethod · 0.95
getDateMethod · 0.95
getMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…