diff options
author | xuri <xuri.me@gmail.com> | 2021-11-20 11:31:17 +0800 |
---|---|---|
committer | xuri <xuri.me@gmail.com> | 2021-11-20 11:31:17 +0800 |
commit | 9b0aa7ac30c69dc0975c8945103dcf909d080912 (patch) | |
tree | 4d4910b5a13a54ef2627c7ffb34381297a04f2cd /styles.go | |
parent | 6b277c61d22419b1006e9b5c557e1175fb2f2d99 (diff) |
This closes #1060, fix build-in time number format parse error
Diffstat (limited to 'styles.go')
-rw-r--r-- | styles.go | 15 |
1 files changed, 13 insertions, 2 deletions
@@ -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"}, } |