mndrix / clk

a distributed time clock application for the command line
The Unlicense
2 stars 0 forks source link

support period "last friday" #12

Open mndrix opened 14 years ago

mndrix commented 14 years ago

Sometimes I know that I worked on something on a specific day, for example "last friday" or "last monday". These phrases should be supported.

To do this, we need to determine which day of the week is today (0-7). Which day of the week the requested day is (0-7). Return a 24 hour interval surrounding N (today-then) days ago. The arithmetic probably needs to be done mod 7.