Skip to content

Commit

Permalink
Use shorter date format
Browse files Browse the repository at this point in the history
  • Loading branch information
lowply committed Jan 19, 2021
1 parent ec4d0af commit a5f1388
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/date.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ func NewDate(t time.Time) *date {
d.Day = fmt.Sprintf("%02d", n.Day())

// https://github.com/jinzhu/now#mondaysunday
d.WeekStartDate = n.Monday().Format("2006/01/02")
d.WeekEndDate = n.Sunday().Format("2006/01/02")
d.WeekStartDate = n.Monday().Format("01/02")
d.WeekEndDate = n.Sunday().Format("01/02")

_, isoweek := n.Monday().ISOWeek()
d.WeekNumber = fmt.Sprintf("%02d", isoweek)
Expand Down

0 comments on commit a5f1388

Please sign in to comment.