1
1
mirror of https://github.com/go-gitea/gitea synced 2024-12-23 17:14:27 +00: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)