Quick hack so that summary splits at 5am instead of 12am (v1.4.3) #452
limdingwen
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Hi, as a frequent late sleeper, I enjoyed a ATracker (iOS)'s setting that allowed me to configure when the day starts.
I've created a quick hack for timew-1.4.3 to implement this functionality into
timew summary, so that if I run the command at maybe 3am, it will show the previous day's summary (5am to 12am) and the current day's summary (12am to current time), instead of a new day. If run at let's say 10am, it will display the current day's summary from 5am to current time.This hack will break
timew summary <filter>, it only works properly if there is no filter specified. I was unable to find a way to check if the filter was specified from CLI.cpp. Regardless, for those who do not need that functionality, I hope this is useful.You can configure when the day starts on line 50. (
int dayStartHour = 5;)CmdSummary.cpp.zip
Also -- sorry, first time actually posting code on other projects on GitHub. Hope this was the proper channel.
All reactions