diff options
| author | Teddy Wing | 2018-01-28 12:21:27 +0100 |
|---|---|---|
| committer | Teddy Wing | 2018-01-28 12:21:27 +0100 |
| commit | 9c0036f3a1cad39c9bb6da062004d1b09ae66e61 (patch) | |
| tree | 1a2dcaf3053ac16b941ab0c0c7dd1ea5cfe7a03d | |
| parent | 3b62915501e8dd7b29af5fb9ff23bed59c04d600 (diff) | |
| download | hcl-9c0036f3a1cad39c9bb6da062004d1b09ae66e61.tar.bz2 | |
Task#add: Don't use `strftime` on `spent_at`
Before I modified it, the code passed `Date.today` plain in `spent_at`.
Don't bother `strftime`ing since it can just take a Ruby date object.
| -rw-r--r-- | lib/hcl/task.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/hcl/task.rb b/lib/hcl/task.rb index 58b32d7..313fdf1 100644 --- a/lib/hcl/task.rb +++ b/lib/hcl/task.rb @@ -50,7 +50,7 @@ module HCl def add http, opts notes = opts[:note] starting_time = opts[:starting_time] || 0 - spent_at = (opts[:spent_at] || Date.today).strftime('%F') + spent_at = opts[:spent_at] || Date.today DayEntry.new http.post("daily/add", { notes: notes, hours: starting_time, |
