Refactor timeutil package (#28623)

1. make names more readable
2. remove unused FormatLong/FormatShort
3. use `FormatDate` instead of `Format "2006-01-02"`
This commit is contained in:
wxiaoguang 2023-12-28 18:09:57 +08:00 committed by GitHub
parent f3999888c0
commit e743570f65
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 30 additions and 39 deletions

View file

@ -86,7 +86,7 @@ func (m *Milestone) AfterLoad() {
return
}
m.DeadlineString = m.DeadlineUnix.Format("2006-01-02")
m.DeadlineString = m.DeadlineUnix.FormatDate()
if m.IsClosed {
m.IsOverdue = m.ClosedDateUnix >= m.DeadlineUnix
} else {