MCPcopy Create free account
hub / github.com/breck7/scroll / formatLocale

Function formatLocale

external/.d3.js:16019–16369  ·  view source on GitHub ↗
(locale)

Source from the content-addressed store, hash-verified

16017}
16018
16019function formatLocale(locale) {
16020 var locale_dateTime = locale.dateTime,
16021 locale_date = locale.date,
16022 locale_time = locale.time,
16023 locale_periods = locale.periods,
16024 locale_weekdays = locale.days,
16025 locale_shortWeekdays = locale.shortDays,
16026 locale_months = locale.months,
16027 locale_shortMonths = locale.shortMonths;
16028
16029 var periodRe = formatRe(locale_periods),
16030 periodLookup = formatLookup(locale_periods),
16031 weekdayRe = formatRe(locale_weekdays),
16032 weekdayLookup = formatLookup(locale_weekdays),
16033 shortWeekdayRe = formatRe(locale_shortWeekdays),
16034 shortWeekdayLookup = formatLookup(locale_shortWeekdays),
16035 monthRe = formatRe(locale_months),
16036 monthLookup = formatLookup(locale_months),
16037 shortMonthRe = formatRe(locale_shortMonths),
16038 shortMonthLookup = formatLookup(locale_shortMonths);
16039
16040 var formats = {
16041 "a": formatShortWeekday,
16042 "A": formatWeekday,
16043 "b": formatShortMonth,
16044 "B": formatMonth,
16045 "c": null,
16046 "d": formatDayOfMonth,
16047 "e": formatDayOfMonth,
16048 "f": formatMicroseconds,
16049 "g": formatYearISO,
16050 "G": formatFullYearISO,
16051 "H": formatHour24,
16052 "I": formatHour12,
16053 "j": formatDayOfYear,
16054 "L": formatMilliseconds,
16055 "m": formatMonthNumber,
16056 "M": formatMinutes,
16057 "p": formatPeriod,
16058 "q": formatQuarter,
16059 "Q": formatUnixTimestamp,
16060 "s": formatUnixTimestampSeconds,
16061 "S": formatSeconds,
16062 "u": formatWeekdayNumberMonday,
16063 "U": formatWeekNumberSunday,
16064 "V": formatWeekNumberISO,
16065 "w": formatWeekdayNumberSunday,
16066 "W": formatWeekNumberMonday,
16067 "x": null,
16068 "X": null,
16069 "y": formatYear,
16070 "Y": formatFullYear,
16071 "Z": formatZone,
16072 "%": formatLiteralPercent
16073 };
16074
16075 var utcFormats = {
16076 "a": formatUTCShortWeekday,

Callers 1

defaultLocaleFunction · 0.85

Calls 4

formatReFunction · 0.85
formatLookupFunction · 0.85
newFormatFunction · 0.85
newParseFunction · 0.85

Tested by

no test coverage detected