Skip to content

Commit

Permalink
Merge pull request #17064 from Fritzbox2000/master
Browse files Browse the repository at this point in the history
{yy} should be padded to 2 digits
  • Loading branch information
Ovilia authored May 19, 2022
2 parents 5cf53e2 + dffa1ef commit 6c793aa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/util/format.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 6c793aa

Please sign in to comment.