Update end-dates in comments corresponding to PR #2522#47
Update end-dates in comments corresponding to PR #2522#47tbabej merged 1 commit intoGothenburgBitFactory:masterfrom smemsh:update-endof-comments-last-second
Conversation
updates end-dates in comments for eod, eom, eoy, etc cf issue #2519
|
ran the following script to get these, on current 2.6.0 head: for datename in $(
grep ^//...eo src/Datetime.cpp |
awk '{print $2}'
); do
echo -n "$datename "
faketime '2017-03-05 12:34:56' task calc $datename
done | column -tThe diff looks a bit strange, some things changed by more than I expected them to. Let me look at it again to make sure it's right, standby. |
|
yes, I think they are all correct, but I'm a little confused about these: with the reference date of 2017-03-05 12:34:56 (a Sunday), and the calendar: do these look right? It seems to consider the next "work week" to have already begun on Saturday, but I would say the next work week doesn't actually begin until Monday. This would be a separate bug; comment updates in this patch appear to be accurate by manual compare to calendar, assuming the work week calculation is correct. I just think it's strange to say that the work week already cycled to the next one after midnight on Friday, it shouldn't actually change to the next one until Monday 00:00:00 (imo). On Saturday and Sunday it should still think "this work week" is the one that ended the previous Friday, no? That aside, the patch could be merged as-is and would reflect the current code. |
|
@smemsh I think you're correct here in your observations. Let's merge this patchset and perhaps we can open a separate issue for the work week discrepancies. |
make the comments accurate after changes, cf issue #2519