You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by ov...@apache.org on 2022/05/19 03:04:42 UTC
[echarts] branch master updated: {yy} should be padded to 2 digits
This is an automated email from the ASF dual-hosted git repository.
ovilia pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/echarts.git
The following commit(s) were added to refs/heads/master by this push:
new dffa1ef39 {yy} should be padded to 2 digits
new 6c793aad3 Merge pull request #17064 from Fritzbox2000/master
dffa1ef39 is described below
commit dffa1ef39fb03dd0baa4e370857326094f6ee740
Author: Woonters <wo...@gmail.com>
AuthorDate: Wed May 18 16:22:56 2022 +0100
{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 883148cf1..ce85f6c83 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))
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org