Skip to content

Commit

Permalink
Use ISO date format instead of hard-coded English date format for dat…
Browse files Browse the repository at this point in the history
…e range in repo activity page (#21396)

January 2, 2006 -> 2006-01-02

Signed-off-by: Yarden Shoham <[email protected]>
  • Loading branch information
yardenshoham authored Oct 11, 2022
1 parent 1428877 commit 2d4c632
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions routers/web/repo/activity.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ func Activity(ctx *context.Context) {
ctx.Data["Period"] = "weekly"
timeFrom = timeUntil.Add(-time.Hour * 168)
}
ctx.Data["DateFrom"] = timeFrom.Format("January 2, 2006")
ctx.Data["DateUntil"] = timeUntil.Format("January 2, 2006")
ctx.Data["DateFrom"] = timeFrom.Format("2006-01-02")
ctx.Data["DateUntil"] = timeUntil.Format("2006-01-02")
ctx.Data["PeriodText"] = ctx.Tr("repo.activity.period." + ctx.Data["Period"].(string))

var err error
Expand Down

0 comments on commit 2d4c632

Please sign in to comment.