refactor: tighten types and reuse instrument UI
Frontend verify / commits (pull_request) Successful in 24s
Frontend verify / security (pull_request) Failing after 9s
Frontend verify / verify (pull_request) Skipped

This commit is contained in:
2026-09-29 06:15:31 +03:00
parent b404c1802a
commit 7c28a423dd
67 changed files with 380 additions and 347 deletions
+8 -6
View File
@@ -9,13 +9,15 @@ function isValidPeriod(from: null | string, to: null | string) {
);
}
const moscowFormatter = new Intl.DateTimeFormat("en-CA", {
day: "2-digit",
month: "2-digit",
timeZone: "Europe/Moscow",
year: "numeric",
});
function moscowDate(value: Date): string {
const parts = new Intl.DateTimeFormat("en-CA", {
day: "2-digit",
month: "2-digit",
timeZone: "Europe/Moscow",
year: "numeric",
}).formatToParts(value);
const parts = moscowFormatter.formatToParts(value);
const part = (type: string) =>
parts.find(item => item.type === type)?.value;