Files
klz-cables.com/.pnpm-store/v10/files/44/e8831622f4816465333796350ad21d4058196329dd6e72564ee37e4919382e8e651b56c8f9dac933b1eec7cce94c5f21938c36e46e6487c4202fa8d5d69b2e
Marc Mintel 5397309103
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
fix(products): fix breadcrumbs and product filtering (backport from main)
2026-02-24 16:04:21 +01:00

59 lines
1.4 KiB
Plaintext

"use strict";
exports.DayPeriodParser = void 0;
var _Parser = require("../Parser.cjs");
var _utils = require("../utils.cjs");
// in the morning, in the afternoon, in the evening, at night
class DayPeriodParser extends _Parser.Parser {
priority = 80;
parse(dateString, token, match) {
switch (token) {
case "B":
case "BB":
case "BBB":
return (
match.dayPeriod(dateString, {
width: "abbreviated",
context: "formatting",
}) ||
match.dayPeriod(dateString, {
width: "narrow",
context: "formatting",
})
);
case "BBBBB":
return match.dayPeriod(dateString, {
width: "narrow",
context: "formatting",
});
case "BBBB":
default:
return (
match.dayPeriod(dateString, {
width: "wide",
context: "formatting",
}) ||
match.dayPeriod(dateString, {
width: "abbreviated",
context: "formatting",
}) ||
match.dayPeriod(dateString, {
width: "narrow",
context: "formatting",
})
);
}
}
set(date, _flags, value) {
date.setHours((0, _utils.dayPeriodEnumToHours)(value), 0, 0, 0);
return date;
}
incompatibleTokens = ["a", "b", "t", "T"];
}
exports.DayPeriodParser = DayPeriodParser;