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

Method _isWeekend

packages/main/src/DayPicker.ts:839–848  ·  view source on GitHub ↗
(oDate: CalendarDate)

Source from the content-addressed store, hash-verified

837 }
838
839 _isWeekend(oDate: CalendarDate): boolean {
840 const localeData = getCachedLocaleDataInstance(getLocale());
841
842 const iWeekDay = oDate.getDay(),
843 iWeekendStart = localeData.getWeekendStart(),
844 iWeekendEnd = localeData.getWeekendEnd();
845
846 return (iWeekDay >= iWeekendStart && iWeekDay <= iWeekendEnd)
847 || (iWeekendEnd < iWeekendStart && (iWeekDay >= iWeekendStart || iWeekDay <= iWeekendEnd));
848 }
849
850 /**
851 * Pre-computes disabled date range timestamps once before the rendering loop.

Callers 1

_buildWeeksMethod · 0.95

Calls 3

getLocaleFunction · 0.85
getDayMethod · 0.80

Tested by

no test coverage detected