Skip to content

Commit dfae81a

Browse files
committed
entries: fixed date package related merge issue
1 parent 742094a commit dfae81a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cmd/entries.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ func init() {
4848
entriesCreateCommand.Flags().StringVarP(&createServiceId, "serviceid", "s", "", "service id for time entry (HINT: use the 'service' sub-command to find the id)")
4949
entriesCommand.AddCommand(entriesCreateCommand)
5050
// edit
51-
entriesEditCommand.Flags().StringVarP(&editDate, "date", "D", now.Format("2006-01-02"), "day for which to edit entry (in YYYY-MM-DD format)")
51+
entriesEditCommand.Flags().StringVarP(&editDate, "date", "D", today.String(), "day for which to edit entry (in YYYY-MM-DD format)")
5252
entriesEditCommand.Flags().StringVarP(&editDuration, "duration", "d", "", "duration of entry (format examples: '1h15m' or '300m' or '6h')")
5353
entriesEditCommand.Flags().StringVarP(&editNote, "note", "n", "", "a note describing what was worked on")
5454
entriesEditCommand.Flags().StringVarP(&editTimeEntryId, "id", "i", "", "the time entry id to edit")
@@ -165,7 +165,7 @@ var entriesEditCommand = &cobra.Command{
165165

166166
// override only fields affected by set parameters of edit
167167
if editDate != "" {
168-
eDate, err := time.Parse("2006-01-02", editDate)
168+
eDate, err := date.Parse(editDate)
169169
if err != nil {
170170
return err
171171
}

0 commit comments

Comments
 (0)