0
0
Fork 0
mirror of https://github.com/go-gitea/gitea synced 2024-11-26 07:12:48 +01:00

fix milestone format parse

This commit is contained in:
Unknwon 2015-08-05 20:37:14 +08:00
parent 44c32a8a53
commit 77dcef0cab
3 changed files with 6 additions and 6 deletions

View file

@ -406,7 +406,7 @@ milestones.title = Title
milestones.desc = Description
milestones.due_date = Due Date (optional)
milestones.clear = Clear
milestones.invalid_due_date_format = Due date format is invalid, must be 'mm/dd/year'.
milestones.invalid_due_date_format = Due date format is invalid, must be 'year-mm-dd'.
milestones.create_success = Milestone '%s' has been created successfully!
milestones.edit = Edit Milestone
milestones.edit_subheader = Use better description for milestones so people won't be confused.

File diff suppressed because one or more lines are too long

View file

@ -1033,9 +1033,9 @@ func NewMilestonePost(ctx *middleware.Context, form auth.CreateMilestoneForm) {
}
if len(form.Deadline) == 0 {
form.Deadline = "12/31/9999"
form.Deadline = "9999-12-31"
}
deadline, err := time.Parse("01/02/2006", form.Deadline)
deadline, err := time.Parse("2006-01-02", form.Deadline)
if err != nil {
ctx.Data["Err_Deadline"] = true
ctx.RenderWithErr(ctx.Tr("repo.milestones.invalid_due_date_format"), MILESTONE_NEW, &form)