Skip to content

Commit

Permalink
fix bug in #839
Browse files Browse the repository at this point in the history
  • Loading branch information
lfq7413 authored May 14, 2021
1 parent 37342f6 commit 9a54595
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions styles.go
Original file line number Diff line number Diff line change
Expand Up @@ -1016,13 +1016,13 @@ func parseTime(v string, format string) string {
goFmt = strings.Replace(goFmt, "H", "3", 1)
} else {
goFmt = strings.Replace(goFmt, "hh", "15", 1)
if val.Hour() < 12 {
if 0 < val.Hour() && val.Hour() < 12 {
goFmt = strings.Replace(goFmt, "h", "3", 1)
} else {
goFmt = strings.Replace(goFmt, "h", "15", 1)
}
goFmt = strings.Replace(goFmt, "HH", "15", 1)
if val.Hour() < 12 {
if 0 < val.Hour() && val.Hour() < 12 {
goFmt = strings.Replace(goFmt, "H", "3", 1)
} else {
goFmt = strings.Replace(goFmt, "H", "15", 1)
Expand Down

0 comments on commit 9a54595

Please sign in to comment.