mirror of
https://github.com/GothenburgBitFactory/timewarrior.git
synced 2025-07-07 20:06:39 +02:00
Use 'sonw' instead of 'eow'
With GothenburgBitFactory/taskwarrior#2519, all 'end of *' named dates have been changed to be the last minute of the respective date. This caused the ':lastweek' hint to miss the last day of its range. Closes #493 Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
This commit is contained in:
parent
0b641da598
commit
40e6c4adaf
3 changed files with 10 additions and 6 deletions
|
@ -189,17 +189,16 @@ bool expandIntervalHint (
|
|||
// Some require math.
|
||||
if (hint == ":lastweek")
|
||||
{
|
||||
// Note: Simply subtracting (7 * 86400) from sow, eow fails to consider
|
||||
// daylight savings.
|
||||
// Note: Simply subtracting (7 * 86400) from sow/sonw fails to consider daylight saving time.
|
||||
Datetime sow ("sow");
|
||||
int sy = sow.year ();
|
||||
int sm = sow.month ();
|
||||
int sd = sow.day ();
|
||||
|
||||
Datetime eow ("eow");
|
||||
int ey = eow.year ();
|
||||
int em = eow.month ();
|
||||
int ed = eow.day ();
|
||||
Datetime sonw ("sonw");
|
||||
int ey = sonw.year ();
|
||||
int em = sonw.month ();
|
||||
int ed = sonw.day ();
|
||||
|
||||
sd -= 7;
|
||||
if (sd < 1)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue