summaryrefslogtreecommitdiff
path: root/styles.go
diff options
context:
space:
mode:
authorxuri <xuri.me@gmail.com>2021-11-20 11:31:17 +0800
committerxuri <xuri.me@gmail.com>2021-11-20 11:31:17 +0800
commit9b0aa7ac30c69dc0975c8945103dcf909d080912 (patch)
tree4d4910b5a13a54ef2627c7ffb34381297a04f2cd /styles.go
parent6b277c61d22419b1006e9b5c557e1175fb2f2d99 (diff)
This closes #1060, fix build-in time number format parse error
Diffstat (limited to 'styles.go')
-rw-r--r--styles.go15
1 files changed, 13 insertions, 2 deletions
diff --git a/styles.go b/styles.go
index 183211b..e32fb78 100644
--- a/styles.go
+++ b/styles.go
@@ -981,22 +981,33 @@ func parseTime(v string, format string) string {
{"D", "2"},
{"yyyy", "2006"},
{"yy", "06"},
+ {"MMMM", "%%%%"},
{"mmmm", "%%%%"},
+ {"DDDD", "&&&&"},
{"dddd", "&&&&"},
+ {"DD", "02"},
{"dd", "02"},
+ {"D", "2"},
{"d", "2"},
+ {"MMM", "Jan"},
{"mmm", "Jan"},
+ {"MMSS", "0405"},
{"mmss", "0405"},
+ {"SS", "05"},
{"ss", "05"},
{"s", "5"},
+ {"MM:", "04:"},
{"mm:", "04:"},
+ {":MM", ":04"},
{":mm", ":04"},
{"m:", "4:"},
{":m", ":4"},
+ {"MM", "01"},
{"mm", "01"},
- {"am/pm", "pm"},
+ {"AM/PM", "PM"},
+ {"am/pm", "PM"},
+ {"M/", "1/"},
{"m/", "1/"},
- {"m", "1"},
{"%%%%", "January"},
{"&&&&", "Monday"},
}