Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93

Warning: Undefined array key "page_file_edit_line" in /home/sportsfever/public_html/filemanger/edit_text_line.php on line 32
/home/sportsfe.../httpdocs/clone/wp-inclu.../js/dist
File: components.js
const year = getWeekYear(date, options);
[54500] Fix | Delete
const firstWeek = constructFrom_constructFrom(date, 0);
[54501] Fix | Delete
firstWeek.setFullYear(year, 0, firstWeekContainsDate);
[54502] Fix | Delete
firstWeek.setHours(0, 0, 0, 0);
[54503] Fix | Delete
const _date = startOfWeek_startOfWeek(firstWeek, options);
[54504] Fix | Delete
return _date;
[54505] Fix | Delete
}
[54506] Fix | Delete
[54507] Fix | Delete
// Fallback for modularized imports:
[54508] Fix | Delete
/* harmony default export */ const date_fns_startOfWeekYear = ((/* unused pure expression or super */ null && (startOfWeekYear)));
[54509] Fix | Delete
[54510] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/date-fns/getWeek.mjs
[54511] Fix | Delete
[54512] Fix | Delete
[54513] Fix | Delete
[54514] Fix | Delete
[54515] Fix | Delete
[54516] Fix | Delete
/**
[54517] Fix | Delete
* The {@link getWeek} function options.
[54518] Fix | Delete
*/
[54519] Fix | Delete
[54520] Fix | Delete
/**
[54521] Fix | Delete
* @name getWeek
[54522] Fix | Delete
* @category Week Helpers
[54523] Fix | Delete
* @summary Get the local week index of the given date.
[54524] Fix | Delete
*
[54525] Fix | Delete
* @description
[54526] Fix | Delete
* Get the local week index of the given date.
[54527] Fix | Delete
* The exact calculation depends on the values of
[54528] Fix | Delete
* `options.weekStartsOn` (which is the index of the first day of the week)
[54529] Fix | Delete
* and `options.firstWeekContainsDate` (which is the day of January, which is always in
[54530] Fix | Delete
* the first week of the week-numbering year)
[54531] Fix | Delete
*
[54532] Fix | Delete
* Week numbering: https://en.wikipedia.org/wiki/Week#The_ISO_week_date_system
[54533] Fix | Delete
*
[54534] Fix | Delete
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
[54535] Fix | Delete
*
[54536] Fix | Delete
* @param date - The given date
[54537] Fix | Delete
* @param options - An object with options
[54538] Fix | Delete
*
[54539] Fix | Delete
* @returns The week
[54540] Fix | Delete
*
[54541] Fix | Delete
* @example
[54542] Fix | Delete
* // Which week of the local week numbering year is 2 January 2005 with default options?
[54543] Fix | Delete
* const result = getWeek(new Date(2005, 0, 2))
[54544] Fix | Delete
* //=> 2
[54545] Fix | Delete
*
[54546] Fix | Delete
* @example
[54547] Fix | Delete
* // Which week of the local week numbering year is 2 January 2005,
[54548] Fix | Delete
* // if Monday is the first day of the week,
[54549] Fix | Delete
* // and the first week of the year always contains 4 January?
[54550] Fix | Delete
* const result = getWeek(new Date(2005, 0, 2), {
[54551] Fix | Delete
* weekStartsOn: 1,
[54552] Fix | Delete
* firstWeekContainsDate: 4
[54553] Fix | Delete
* })
[54554] Fix | Delete
* //=> 53
[54555] Fix | Delete
*/
[54556] Fix | Delete
[54557] Fix | Delete
function getWeek(date, options) {
[54558] Fix | Delete
const _date = toDate_toDate(date);
[54559] Fix | Delete
const diff = +startOfWeek_startOfWeek(_date, options) - +startOfWeekYear(_date, options);
[54560] Fix | Delete
[54561] Fix | Delete
// Round the number of weeks to the nearest integer because the number of
[54562] Fix | Delete
// milliseconds in a week is not constant (e.g. it's different in the week of
[54563] Fix | Delete
// the daylight saving time clock shift).
[54564] Fix | Delete
return Math.round(diff / millisecondsInWeek) + 1;
[54565] Fix | Delete
}
[54566] Fix | Delete
[54567] Fix | Delete
// Fallback for modularized imports:
[54568] Fix | Delete
/* harmony default export */ const date_fns_getWeek = ((/* unused pure expression or super */ null && (getWeek)));
[54569] Fix | Delete
[54570] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/date-fns/_lib/addLeadingZeros.mjs
[54571] Fix | Delete
function addLeadingZeros(number, targetLength) {
[54572] Fix | Delete
const sign = number < 0 ? "-" : "";
[54573] Fix | Delete
const output = Math.abs(number).toString().padStart(targetLength, "0");
[54574] Fix | Delete
return sign + output;
[54575] Fix | Delete
}
[54576] Fix | Delete
[54577] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/date-fns/_lib/format/lightFormatters.mjs
[54578] Fix | Delete
[54579] Fix | Delete
[54580] Fix | Delete
/*
[54581] Fix | Delete
* | | Unit | | Unit |
[54582] Fix | Delete
* |-----|--------------------------------|-----|--------------------------------|
[54583] Fix | Delete
* | a | AM, PM | A* | |
[54584] Fix | Delete
* | d | Day of month | D | |
[54585] Fix | Delete
* | h | Hour [1-12] | H | Hour [0-23] |
[54586] Fix | Delete
* | m | Minute | M | Month |
[54587] Fix | Delete
* | s | Second | S | Fraction of second |
[54588] Fix | Delete
* | y | Year (abs) | Y | |
[54589] Fix | Delete
*
[54590] Fix | Delete
* Letters marked by * are not implemented but reserved by Unicode standard.
[54591] Fix | Delete
*/
[54592] Fix | Delete
[54593] Fix | Delete
const lightFormatters = {
[54594] Fix | Delete
// Year
[54595] Fix | Delete
y(date, token) {
[54596] Fix | Delete
// From http://www.unicode.org/reports/tr35/tr35-31/tr35-dates.html#Date_Format_tokens
[54597] Fix | Delete
// | Year | y | yy | yyy | yyyy | yyyyy |
[54598] Fix | Delete
// |----------|-------|----|-------|-------|-------|
[54599] Fix | Delete
// | AD 1 | 1 | 01 | 001 | 0001 | 00001 |
[54600] Fix | Delete
// | AD 12 | 12 | 12 | 012 | 0012 | 00012 |
[54601] Fix | Delete
// | AD 123 | 123 | 23 | 123 | 0123 | 00123 |
[54602] Fix | Delete
// | AD 1234 | 1234 | 34 | 1234 | 1234 | 01234 |
[54603] Fix | Delete
// | AD 12345 | 12345 | 45 | 12345 | 12345 | 12345 |
[54604] Fix | Delete
[54605] Fix | Delete
const signedYear = date.getFullYear();
[54606] Fix | Delete
// Returns 1 for 1 BC (which is year 0 in JavaScript)
[54607] Fix | Delete
const year = signedYear > 0 ? signedYear : 1 - signedYear;
[54608] Fix | Delete
return addLeadingZeros(token === "yy" ? year % 100 : year, token.length);
[54609] Fix | Delete
},
[54610] Fix | Delete
[54611] Fix | Delete
// Month
[54612] Fix | Delete
M(date, token) {
[54613] Fix | Delete
const month = date.getMonth();
[54614] Fix | Delete
return token === "M" ? String(month + 1) : addLeadingZeros(month + 1, 2);
[54615] Fix | Delete
},
[54616] Fix | Delete
[54617] Fix | Delete
// Day of the month
[54618] Fix | Delete
d(date, token) {
[54619] Fix | Delete
return addLeadingZeros(date.getDate(), token.length);
[54620] Fix | Delete
},
[54621] Fix | Delete
[54622] Fix | Delete
// AM or PM
[54623] Fix | Delete
a(date, token) {
[54624] Fix | Delete
const dayPeriodEnumValue = date.getHours() / 12 >= 1 ? "pm" : "am";
[54625] Fix | Delete
[54626] Fix | Delete
switch (token) {
[54627] Fix | Delete
case "a":
[54628] Fix | Delete
case "aa":
[54629] Fix | Delete
return dayPeriodEnumValue.toUpperCase();
[54630] Fix | Delete
case "aaa":
[54631] Fix | Delete
return dayPeriodEnumValue;
[54632] Fix | Delete
case "aaaaa":
[54633] Fix | Delete
return dayPeriodEnumValue[0];
[54634] Fix | Delete
case "aaaa":
[54635] Fix | Delete
default:
[54636] Fix | Delete
return dayPeriodEnumValue === "am" ? "a.m." : "p.m.";
[54637] Fix | Delete
}
[54638] Fix | Delete
},
[54639] Fix | Delete
[54640] Fix | Delete
// Hour [1-12]
[54641] Fix | Delete
h(date, token) {
[54642] Fix | Delete
return addLeadingZeros(date.getHours() % 12 || 12, token.length);
[54643] Fix | Delete
},
[54644] Fix | Delete
[54645] Fix | Delete
// Hour [0-23]
[54646] Fix | Delete
H(date, token) {
[54647] Fix | Delete
return addLeadingZeros(date.getHours(), token.length);
[54648] Fix | Delete
},
[54649] Fix | Delete
[54650] Fix | Delete
// Minute
[54651] Fix | Delete
m(date, token) {
[54652] Fix | Delete
return addLeadingZeros(date.getMinutes(), token.length);
[54653] Fix | Delete
},
[54654] Fix | Delete
[54655] Fix | Delete
// Second
[54656] Fix | Delete
s(date, token) {
[54657] Fix | Delete
return addLeadingZeros(date.getSeconds(), token.length);
[54658] Fix | Delete
},
[54659] Fix | Delete
[54660] Fix | Delete
// Fraction of second
[54661] Fix | Delete
S(date, token) {
[54662] Fix | Delete
const numberOfDigits = token.length;
[54663] Fix | Delete
const milliseconds = date.getMilliseconds();
[54664] Fix | Delete
const fractionalSeconds = Math.trunc(
[54665] Fix | Delete
milliseconds * Math.pow(10, numberOfDigits - 3),
[54666] Fix | Delete
);
[54667] Fix | Delete
return addLeadingZeros(fractionalSeconds, token.length);
[54668] Fix | Delete
},
[54669] Fix | Delete
};
[54670] Fix | Delete
[54671] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/date-fns/_lib/format/formatters.mjs
[54672] Fix | Delete
[54673] Fix | Delete
[54674] Fix | Delete
[54675] Fix | Delete
[54676] Fix | Delete
[54677] Fix | Delete
[54678] Fix | Delete
[54679] Fix | Delete
[54680] Fix | Delete
const dayPeriodEnum = {
[54681] Fix | Delete
am: "am",
[54682] Fix | Delete
pm: "pm",
[54683] Fix | Delete
midnight: "midnight",
[54684] Fix | Delete
noon: "noon",
[54685] Fix | Delete
morning: "morning",
[54686] Fix | Delete
afternoon: "afternoon",
[54687] Fix | Delete
evening: "evening",
[54688] Fix | Delete
night: "night",
[54689] Fix | Delete
};
[54690] Fix | Delete
[54691] Fix | Delete
/*
[54692] Fix | Delete
* | | Unit | | Unit |
[54693] Fix | Delete
* |-----|--------------------------------|-----|--------------------------------|
[54694] Fix | Delete
* | a | AM, PM | A* | Milliseconds in day |
[54695] Fix | Delete
* | b | AM, PM, noon, midnight | B | Flexible day period |
[54696] Fix | Delete
* | c | Stand-alone local day of week | C* | Localized hour w/ day period |
[54697] Fix | Delete
* | d | Day of month | D | Day of year |
[54698] Fix | Delete
* | e | Local day of week | E | Day of week |
[54699] Fix | Delete
* | f | | F* | Day of week in month |
[54700] Fix | Delete
* | g* | Modified Julian day | G | Era |
[54701] Fix | Delete
* | h | Hour [1-12] | H | Hour [0-23] |
[54702] Fix | Delete
* | i! | ISO day of week | I! | ISO week of year |
[54703] Fix | Delete
* | j* | Localized hour w/ day period | J* | Localized hour w/o day period |
[54704] Fix | Delete
* | k | Hour [1-24] | K | Hour [0-11] |
[54705] Fix | Delete
* | l* | (deprecated) | L | Stand-alone month |
[54706] Fix | Delete
* | m | Minute | M | Month |
[54707] Fix | Delete
* | n | | N | |
[54708] Fix | Delete
* | o! | Ordinal number modifier | O | Timezone (GMT) |
[54709] Fix | Delete
* | p! | Long localized time | P! | Long localized date |
[54710] Fix | Delete
* | q | Stand-alone quarter | Q | Quarter |
[54711] Fix | Delete
* | r* | Related Gregorian year | R! | ISO week-numbering year |
[54712] Fix | Delete
* | s | Second | S | Fraction of second |
[54713] Fix | Delete
* | t! | Seconds timestamp | T! | Milliseconds timestamp |
[54714] Fix | Delete
* | u | Extended year | U* | Cyclic year |
[54715] Fix | Delete
* | v* | Timezone (generic non-locat.) | V* | Timezone (location) |
[54716] Fix | Delete
* | w | Local week of year | W* | Week of month |
[54717] Fix | Delete
* | x | Timezone (ISO-8601 w/o Z) | X | Timezone (ISO-8601) |
[54718] Fix | Delete
* | y | Year (abs) | Y | Local week-numbering year |
[54719] Fix | Delete
* | z | Timezone (specific non-locat.) | Z* | Timezone (aliases) |
[54720] Fix | Delete
*
[54721] Fix | Delete
* Letters marked by * are not implemented but reserved by Unicode standard.
[54722] Fix | Delete
*
[54723] Fix | Delete
* Letters marked by ! are non-standard, but implemented by date-fns:
[54724] Fix | Delete
* - `o` modifies the previous token to turn it into an ordinal (see `format` docs)
[54725] Fix | Delete
* - `i` is ISO day of week. For `i` and `ii` is returns numeric ISO week days,
[54726] Fix | Delete
* i.e. 7 for Sunday, 1 for Monday, etc.
[54727] Fix | Delete
* - `I` is ISO week of year, as opposed to `w` which is local week of year.
[54728] Fix | Delete
* - `R` is ISO week-numbering year, as opposed to `Y` which is local week-numbering year.
[54729] Fix | Delete
* `R` is supposed to be used in conjunction with `I` and `i`
[54730] Fix | Delete
* for universal ISO week-numbering date, whereas
[54731] Fix | Delete
* `Y` is supposed to be used in conjunction with `w` and `e`
[54732] Fix | Delete
* for week-numbering date specific to the locale.
[54733] Fix | Delete
* - `P` is long localized date format
[54734] Fix | Delete
* - `p` is long localized time format
[54735] Fix | Delete
*/
[54736] Fix | Delete
[54737] Fix | Delete
const formatters = {
[54738] Fix | Delete
// Era
[54739] Fix | Delete
G: function (date, token, localize) {
[54740] Fix | Delete
const era = date.getFullYear() > 0 ? 1 : 0;
[54741] Fix | Delete
switch (token) {
[54742] Fix | Delete
// AD, BC
[54743] Fix | Delete
case "G":
[54744] Fix | Delete
case "GG":
[54745] Fix | Delete
case "GGG":
[54746] Fix | Delete
return localize.era(era, { width: "abbreviated" });
[54747] Fix | Delete
// A, B
[54748] Fix | Delete
case "GGGGG":
[54749] Fix | Delete
return localize.era(era, { width: "narrow" });
[54750] Fix | Delete
// Anno Domini, Before Christ
[54751] Fix | Delete
case "GGGG":
[54752] Fix | Delete
default:
[54753] Fix | Delete
return localize.era(era, { width: "wide" });
[54754] Fix | Delete
}
[54755] Fix | Delete
},
[54756] Fix | Delete
[54757] Fix | Delete
// Year
[54758] Fix | Delete
y: function (date, token, localize) {
[54759] Fix | Delete
// Ordinal number
[54760] Fix | Delete
if (token === "yo") {
[54761] Fix | Delete
const signedYear = date.getFullYear();
[54762] Fix | Delete
// Returns 1 for 1 BC (which is year 0 in JavaScript)
[54763] Fix | Delete
const year = signedYear > 0 ? signedYear : 1 - signedYear;
[54764] Fix | Delete
return localize.ordinalNumber(year, { unit: "year" });
[54765] Fix | Delete
}
[54766] Fix | Delete
[54767] Fix | Delete
return lightFormatters.y(date, token);
[54768] Fix | Delete
},
[54769] Fix | Delete
[54770] Fix | Delete
// Local week-numbering year
[54771] Fix | Delete
Y: function (date, token, localize, options) {
[54772] Fix | Delete
const signedWeekYear = getWeekYear(date, options);
[54773] Fix | Delete
// Returns 1 for 1 BC (which is year 0 in JavaScript)
[54774] Fix | Delete
const weekYear = signedWeekYear > 0 ? signedWeekYear : 1 - signedWeekYear;
[54775] Fix | Delete
[54776] Fix | Delete
// Two digit year
[54777] Fix | Delete
if (token === "YY") {
[54778] Fix | Delete
const twoDigitYear = weekYear % 100;
[54779] Fix | Delete
return addLeadingZeros(twoDigitYear, 2);
[54780] Fix | Delete
}
[54781] Fix | Delete
[54782] Fix | Delete
// Ordinal number
[54783] Fix | Delete
if (token === "Yo") {
[54784] Fix | Delete
return localize.ordinalNumber(weekYear, { unit: "year" });
[54785] Fix | Delete
}
[54786] Fix | Delete
[54787] Fix | Delete
// Padding
[54788] Fix | Delete
return addLeadingZeros(weekYear, token.length);
[54789] Fix | Delete
},
[54790] Fix | Delete
[54791] Fix | Delete
// ISO week-numbering year
[54792] Fix | Delete
R: function (date, token) {
[54793] Fix | Delete
const isoWeekYear = getISOWeekYear(date);
[54794] Fix | Delete
[54795] Fix | Delete
// Padding
[54796] Fix | Delete
return addLeadingZeros(isoWeekYear, token.length);
[54797] Fix | Delete
},
[54798] Fix | Delete
[54799] Fix | Delete
// Extended year. This is a single number designating the year of this calendar system.
[54800] Fix | Delete
// The main difference between `y` and `u` localizers are B.C. years:
[54801] Fix | Delete
// | Year | `y` | `u` |
[54802] Fix | Delete
// |------|-----|-----|
[54803] Fix | Delete
// | AC 1 | 1 | 1 |
[54804] Fix | Delete
// | BC 1 | 1 | 0 |
[54805] Fix | Delete
// | BC 2 | 2 | -1 |
[54806] Fix | Delete
// Also `yy` always returns the last two digits of a year,
[54807] Fix | Delete
// while `uu` pads single digit years to 2 characters and returns other years unchanged.
[54808] Fix | Delete
u: function (date, token) {
[54809] Fix | Delete
const year = date.getFullYear();
[54810] Fix | Delete
return addLeadingZeros(year, token.length);
[54811] Fix | Delete
},
[54812] Fix | Delete
[54813] Fix | Delete
// Quarter
[54814] Fix | Delete
Q: function (date, token, localize) {
[54815] Fix | Delete
const quarter = Math.ceil((date.getMonth() + 1) / 3);
[54816] Fix | Delete
switch (token) {
[54817] Fix | Delete
// 1, 2, 3, 4
[54818] Fix | Delete
case "Q":
[54819] Fix | Delete
return String(quarter);
[54820] Fix | Delete
// 01, 02, 03, 04
[54821] Fix | Delete
case "QQ":
[54822] Fix | Delete
return addLeadingZeros(quarter, 2);
[54823] Fix | Delete
// 1st, 2nd, 3rd, 4th
[54824] Fix | Delete
case "Qo":
[54825] Fix | Delete
return localize.ordinalNumber(quarter, { unit: "quarter" });
[54826] Fix | Delete
// Q1, Q2, Q3, Q4
[54827] Fix | Delete
case "QQQ":
[54828] Fix | Delete
return localize.quarter(quarter, {
[54829] Fix | Delete
width: "abbreviated",
[54830] Fix | Delete
context: "formatting",
[54831] Fix | Delete
});
[54832] Fix | Delete
// 1, 2, 3, 4 (narrow quarter; could be not numerical)
[54833] Fix | Delete
case "QQQQQ":
[54834] Fix | Delete
return localize.quarter(quarter, {
[54835] Fix | Delete
width: "narrow",
[54836] Fix | Delete
context: "formatting",
[54837] Fix | Delete
});
[54838] Fix | Delete
// 1st quarter, 2nd quarter, ...
[54839] Fix | Delete
case "QQQQ":
[54840] Fix | Delete
default:
[54841] Fix | Delete
return localize.quarter(quarter, {
[54842] Fix | Delete
width: "wide",
[54843] Fix | Delete
context: "formatting",
[54844] Fix | Delete
});
[54845] Fix | Delete
}
[54846] Fix | Delete
},
[54847] Fix | Delete
[54848] Fix | Delete
// Stand-alone quarter
[54849] Fix | Delete
q: function (date, token, localize) {
[54850] Fix | Delete
const quarter = Math.ceil((date.getMonth() + 1) / 3);
[54851] Fix | Delete
switch (token) {
[54852] Fix | Delete
// 1, 2, 3, 4
[54853] Fix | Delete
case "q":
[54854] Fix | Delete
return String(quarter);
[54855] Fix | Delete
// 01, 02, 03, 04
[54856] Fix | Delete
case "qq":
[54857] Fix | Delete
return addLeadingZeros(quarter, 2);
[54858] Fix | Delete
// 1st, 2nd, 3rd, 4th
[54859] Fix | Delete
case "qo":
[54860] Fix | Delete
return localize.ordinalNumber(quarter, { unit: "quarter" });
[54861] Fix | Delete
// Q1, Q2, Q3, Q4
[54862] Fix | Delete
case "qqq":
[54863] Fix | Delete
return localize.quarter(quarter, {
[54864] Fix | Delete
width: "abbreviated",
[54865] Fix | Delete
context: "standalone",
[54866] Fix | Delete
});
[54867] Fix | Delete
// 1, 2, 3, 4 (narrow quarter; could be not numerical)
[54868] Fix | Delete
case "qqqqq":
[54869] Fix | Delete
return localize.quarter(quarter, {
[54870] Fix | Delete
width: "narrow",
[54871] Fix | Delete
context: "standalone",
[54872] Fix | Delete
});
[54873] Fix | Delete
// 1st quarter, 2nd quarter, ...
[54874] Fix | Delete
case "qqqq":
[54875] Fix | Delete
default:
[54876] Fix | Delete
return localize.quarter(quarter, {
[54877] Fix | Delete
width: "wide",
[54878] Fix | Delete
context: "standalone",
[54879] Fix | Delete
});
[54880] Fix | Delete
}
[54881] Fix | Delete
},
[54882] Fix | Delete
[54883] Fix | Delete
// Month
[54884] Fix | Delete
M: function (date, token, localize) {
[54885] Fix | Delete
const month = date.getMonth();
[54886] Fix | Delete
switch (token) {
[54887] Fix | Delete
case "M":
[54888] Fix | Delete
case "MM":
[54889] Fix | Delete
return lightFormatters.M(date, token);
[54890] Fix | Delete
// 1st, 2nd, ..., 12th
[54891] Fix | Delete
case "Mo":
[54892] Fix | Delete
return localize.ordinalNumber(month + 1, { unit: "month" });
[54893] Fix | Delete
// Jan, Feb, ..., Dec
[54894] Fix | Delete
case "MMM":
[54895] Fix | Delete
return localize.month(month, {
[54896] Fix | Delete
width: "abbreviated",
[54897] Fix | Delete
context: "formatting",
[54898] Fix | Delete
});
[54899] Fix | Delete
// J, F, ..., D
[54900] Fix | Delete
case "MMMMM":
[54901] Fix | Delete
return localize.month(month, {
[54902] Fix | Delete
width: "narrow",
[54903] Fix | Delete
context: "formatting",
[54904] Fix | Delete
});
[54905] Fix | Delete
// January, February, ..., December
[54906] Fix | Delete
case "MMMM":
[54907] Fix | Delete
default:
[54908] Fix | Delete
return localize.month(month, { width: "wide", context: "formatting" });
[54909] Fix | Delete
}
[54910] Fix | Delete
},
[54911] Fix | Delete
[54912] Fix | Delete
// Stand-alone month
[54913] Fix | Delete
L: function (date, token, localize) {
[54914] Fix | Delete
const month = date.getMonth();
[54915] Fix | Delete
switch (token) {
[54916] Fix | Delete
// 1, 2, ..., 12
[54917] Fix | Delete
case "L":
[54918] Fix | Delete
return String(month + 1);
[54919] Fix | Delete
// 01, 02, ..., 12
[54920] Fix | Delete
case "LL":
[54921] Fix | Delete
return addLeadingZeros(month + 1, 2);
[54922] Fix | Delete
// 1st, 2nd, ..., 12th
[54923] Fix | Delete
case "Lo":
[54924] Fix | Delete
return localize.ordinalNumber(month + 1, { unit: "month" });
[54925] Fix | Delete
// Jan, Feb, ..., Dec
[54926] Fix | Delete
case "LLL":
[54927] Fix | Delete
return localize.month(month, {
[54928] Fix | Delete
width: "abbreviated",
[54929] Fix | Delete
context: "standalone",
[54930] Fix | Delete
});
[54931] Fix | Delete
// J, F, ..., D
[54932] Fix | Delete
case "LLLLL":
[54933] Fix | Delete
return localize.month(month, {
[54934] Fix | Delete
width: "narrow",
[54935] Fix | Delete
context: "standalone",
[54936] Fix | Delete
});
[54937] Fix | Delete
// January, February, ..., December
[54938] Fix | Delete
case "LLLL":
[54939] Fix | Delete
default:
[54940] Fix | Delete
return localize.month(month, { width: "wide", context: "standalone" });
[54941] Fix | Delete
}
[54942] Fix | Delete
},
[54943] Fix | Delete
[54944] Fix | Delete
// Local week of year
[54945] Fix | Delete
w: function (date, token, localize, options) {
[54946] Fix | Delete
const week = getWeek(date, options);
[54947] Fix | Delete
[54948] Fix | Delete
if (token === "wo") {
[54949] Fix | Delete
return localize.ordinalNumber(week, { unit: "week" });
[54950] Fix | Delete
}
[54951] Fix | Delete
[54952] Fix | Delete
return addLeadingZeros(week, token.length);
[54953] Fix | Delete
},
[54954] Fix | Delete
[54955] Fix | Delete
// ISO week of year
[54956] Fix | Delete
I: function (date, token, localize) {
[54957] Fix | Delete
const isoWeek = getISOWeek(date);
[54958] Fix | Delete
[54959] Fix | Delete
if (token === "Io") {
[54960] Fix | Delete
return localize.ordinalNumber(isoWeek, { unit: "week" });
[54961] Fix | Delete
}
[54962] Fix | Delete
[54963] Fix | Delete
return addLeadingZeros(isoWeek, token.length);
[54964] Fix | Delete
},
[54965] Fix | Delete
[54966] Fix | Delete
// Day of the month
[54967] Fix | Delete
d: function (date, token, localize) {
[54968] Fix | Delete
if (token === "do") {
[54969] Fix | Delete
return localize.ordinalNumber(date.getDate(), { unit: "date" });
[54970] Fix | Delete
}
[54971] Fix | Delete
[54972] Fix | Delete
return lightFormatters.d(date, token);
[54973] Fix | Delete
},
[54974] Fix | Delete
[54975] Fix | Delete
// Day of year
[54976] Fix | Delete
D: function (date, token, localize) {
[54977] Fix | Delete
const dayOfYear = getDayOfYear(date);
[54978] Fix | Delete
[54979] Fix | Delete
if (token === "Do") {
[54980] Fix | Delete
return localize.ordinalNumber(dayOfYear, { unit: "dayOfYear" });
[54981] Fix | Delete
}
[54982] Fix | Delete
[54983] Fix | Delete
return addLeadingZeros(dayOfYear, token.length);
[54984] Fix | Delete
},
[54985] Fix | Delete
[54986] Fix | Delete
// Day of week
[54987] Fix | Delete
E: function (date, token, localize) {
[54988] Fix | Delete
const dayOfWeek = date.getDay();
[54989] Fix | Delete
switch (token) {
[54990] Fix | Delete
// Tue
[54991] Fix | Delete
case "E":
[54992] Fix | Delete
case "EE":
[54993] Fix | Delete
case "EEE":
[54994] Fix | Delete
return localize.day(dayOfWeek, {
[54995] Fix | Delete
width: "abbreviated",
[54996] Fix | Delete
context: "formatting",
[54997] Fix | Delete
});
[54998] Fix | Delete
// T
[54999] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function