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

Method _calculateWeekNumber

packages/main/src/DayPicker.ts:373–378  ·  view source on GitHub ↗
(date: Date)

Source from the content-addressed store, hash-verified

371 }
372
373 _calculateWeekNumber(date: Date): number {
374 const oDateFormat = DateFormat.getDateInstance({ pattern: "w", calendarType: this.primaryCalendarType, calendarWeekNumbering: this.calendarWeekNumbering });
375 const weekNumber = oDateFormat.format(date);
376
377 return Number(weekNumber);
378 }
379
380 /**
381 * Builds the dayNames object (header of the month).

Callers 1

_buildWeeksMethod · 0.95

Calls 2

getDateInstanceMethod · 0.80
formatMethod · 0.45

Tested by

no test coverage detected