From dffa1ef39fb03dd0baa4e370857326094f6ee740 Mon Sep 17 00:00:00 2001 From: Woonters Date: Wed, 18 May 2022 16:22:56 +0100 Subject: [PATCH] {yy} should be padded to 2 digits --- src/util/format.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/format.ts b/src/util/format.ts index 883148cf1d..ce85f6c83a 100644 --- a/src/util/format.ts +++ b/src/util/format.ts @@ -289,7 +289,7 @@ export function formatTime(tpl: string, value: unknown, isUTC?: boolean) { tpl = tpl.replace('MM', pad(M, 2)) .replace('M', M) .replace('yyyy', y) - .replace('yy', y % 100 + '') + .replace('yy', pad(y % 100 + '', 2)) .replace('dd', pad(d, 2)) .replace('d', d) .replace('hh', pad(h, 2))