mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
checker: check duplicate of a const name (#8396)
This commit is contained in:
@ -93,7 +93,7 @@ pub fn (t Time) get_fmt_time_str(fmt_time FormatTime) string {
|
||||
return ''
|
||||
}
|
||||
tp := if t.hour > 11 { 'p.m.' } else { 'a.m.' }
|
||||
hour := if t.hour > 12 {
|
||||
hour_ := if t.hour > 12 {
|
||||
t.hour - 12
|
||||
} else if t.hour == 0 {
|
||||
12
|
||||
@ -101,9 +101,9 @@ pub fn (t Time) get_fmt_time_str(fmt_time FormatTime) string {
|
||||
t.hour
|
||||
}
|
||||
return match fmt_time {
|
||||
.hhmm12 { '$hour:${t.minute:02d} $tp' }
|
||||
.hhmm12 { '$hour_:${t.minute:02d} $tp' }
|
||||
.hhmm24 { '${t.hour:02d}:${t.minute:02d}' }
|
||||
.hhmmss12 { '$hour:${t.minute:02d}:${t.second:02d} $tp' }
|
||||
.hhmmss12 { '$hour_:${t.minute:02d}:${t.second:02d} $tp' }
|
||||
.hhmmss24 { '${t.hour:02d}:${t.minute:02d}:${t.second:02d}' }
|
||||
.hhmmss24_milli { '${t.hour:02d}:${t.minute:02d}:${t.second:02d}.${(t.microsecond / 1000):03d}' }
|
||||
.hhmmss24_micro { '${t.hour:02d}:${t.minute:02d}:${t.second:02d}.${t.microsecond:06d}' }
|
||||
|
Reference in New Issue
Block a user