fnogatz / clocker

Command-line tool to track project hours
Other
420 stars 31 forks source link

Support `clocker set start '-10 minutes'` #27

Closed fnogatz closed 6 years ago

yoshuawuyts commented 9 years ago

Could you elaborate a little more on what this does?

fnogatz commented 9 years ago

Sometimes (way too often! :smile:) I forget to start the clocker. Then I do the following commands:

clocker start -t Work
clocker set start '11:10'

The start time is an estimate - most time I simply look at the current time, say "Uhm, I think I started ten minutes ago" and use this time.

yoshuawuyts commented 9 years ago

!!! neat idea !!! 😁🍉

nevilgeorge-zz commented 8 years ago

has someone claimed this? If not, can I give it a shot?

yoshuawuyts commented 8 years ago

@nevilgeorge go for it :sparkles:

nevilgeorge-zz commented 8 years ago

will do! If I have any questions, I'll let you know!

fnogatz commented 8 years ago

Nice :)

I was unsure about distinguishing the following two use cases:

  1. "Set the start time to 10 minutes before the currently stored start time"
  2. "Set the start time to 10 minutes ago (as of now)"

I am not sure which use case is more common. The "-10 minutes" seems a little bit more like version 1, while "10 minutes ago" seems to be more appropriate for version 2. The latter one could be realized using parse-messy-time.

Your opinions?

nevilgeorge-zz commented 8 years ago

The first use case didn't even come to my mind -- I was only of thinking of the second use case. It may be nice to have both of them, though. @yoshuawuyts what are your thoughts?

yoshuawuyts commented 8 years ago

10 minutes ago would be nice.

nevilgeorge-zz commented 8 years ago

I'm working on this now, and just wanted some clarification on the API. Are we expecting it to be clocker set start '-10' or clocker set start '-10 minutes/hours', clocker set start '-10 minutes ago'? Let me know what you think will be best!

fnogatz commented 6 years ago

As of now, things like 10 minutes ago, 10min ago, etc., are supported via parse-messy-time. So everything's done here.