MCPcopy
hub / github.com/microsoft/SandDance / formatLocale

Function formatLocale

docs/app/js/sanddance-app.js:112321–112606  ·  view source on GitHub ↗
(locale)

Source from the content-addressed store, hash-verified

112319 };
112320}
112321function formatLocale(locale) {
112322 var locale_dateTime = locale.dateTime, locale_date = locale.date, locale_time = locale.time, locale_periods = locale.periods, locale_weekdays = locale.days, locale_shortWeekdays = locale.shortDays, locale_months = locale.months, locale_shortMonths = locale.shortMonths;
112323 var periodRe = formatRe(locale_periods), periodLookup = formatLookup(locale_periods), weekdayRe = formatRe(locale_weekdays), weekdayLookup = formatLookup(locale_weekdays), shortWeekdayRe = formatRe(locale_shortWeekdays), shortWeekdayLookup = formatLookup(locale_shortWeekdays), monthRe = formatRe(locale_months), monthLookup = formatLookup(locale_months), shortMonthRe = formatRe(locale_shortMonths), shortMonthLookup = formatLookup(locale_shortMonths);
112324 var formats1 = {
112325 "a": formatShortWeekday,
112326 "A": formatWeekday,
112327 "b": formatShortMonth,
112328 "B": formatMonth,
112329 "c": null,
112330 "d": formatDayOfMonth,
112331 "e": formatDayOfMonth,
112332 "f": formatMicroseconds,
112333 "g": formatYearISO,
112334 "G": formatFullYearISO,
112335 "H": formatHour24,
112336 "I": formatHour12,
112337 "j": formatDayOfYear,
112338 "L": formatMilliseconds,
112339 "m": formatMonthNumber,
112340 "M": formatMinutes,
112341 "p": formatPeriod,
112342 "q": formatQuarter,
112343 "Q": formatUnixTimestamp,
112344 "s": formatUnixTimestampSeconds,
112345 "S": formatSeconds,
112346 "u": formatWeekdayNumberMonday,
112347 "U": formatWeekNumberSunday,
112348 "V": formatWeekNumberISO,
112349 "w": formatWeekdayNumberSunday,
112350 "W": formatWeekNumberMonday,
112351 "x": null,
112352 "X": null,
112353 "y": formatYear,
112354 "Y": formatFullYear,
112355 "Z": formatZone,
112356 "%": formatLiteralPercent
112357 };
112358 var utcFormats = {
112359 "a": formatUTCShortWeekday,
112360 "A": formatUTCWeekday,
112361 "b": formatUTCShortMonth,
112362 "B": formatUTCMonth,
112363 "c": null,
112364 "d": formatUTCDayOfMonth,
112365 "e": formatUTCDayOfMonth,
112366 "f": formatUTCMicroseconds,
112367 "g": formatUTCYearISO,
112368 "G": formatUTCFullYearISO,
112369 "H": formatUTCHour24,
112370 "I": formatUTCHour12,
112371 "j": formatUTCDayOfYear,
112372 "L": formatUTCMilliseconds,
112373 "m": formatUTCMonthNumber,
112374 "M": formatUTCMinutes,
112375 "p": formatUTCPeriod,
112376 "q": formatUTCQuarter,
112377 "Q": formatUnixTimestamp,
112378 "s": formatUnixTimestampSeconds,

Callers

nothing calls this directly

Calls 4

formatReFunction · 0.70
formatLookupFunction · 0.70
newFormatFunction · 0.70
newParseFunction · 0.70

Tested by

no test coverage detected