MCPcopy
hub / github.com/iamkun/dayjs / localeData

Function localeData

src/plugin/localeData/index.js:19–35  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

17 l.formats[format] || t(l.formats[format.toUpperCase()])
18
19 const localeData = function () {
20 return {
21 months: instance =>
22 (instance ? instance.format('MMMM') : getShort(this, 'months')),
23 monthsShort: instance =>
24 (instance ? instance.format('MMM') : getShort(this, 'monthsShort', 'months', 3)),
25 firstDayOfWeek: () => this.$locale().weekStart || 0,
26 weekdays: instance => (instance ? instance.format('dddd') : getShort(this, 'weekdays')),
27 weekdaysMin: instance =>
28 (instance ? instance.format('dd') : getShort(this, 'weekdaysMin', 'weekdays', 2)),
29 weekdaysShort: instance =>
30 (instance ? instance.format('ddd') : getShort(this, 'weekdaysShort', 'weekdays', 3)),
31 longDateFormat: format => getLongDateFormat(this.$locale(), format),
32 meridiem: this.$locale().meridiem,
33 ordinal: this.$locale().ordinal
34 }
35 }
36 proto.localeData = function () {
37 return localeData.bind(this)()
38 }

Callers

nothing calls this directly

Calls 4

getShortFunction · 0.85
getLongDateFormatFunction · 0.85
$localeMethod · 0.80
formatMethod · 0.65

Tested by

no test coverage detected