TW-1611: soww weirdness

- Thanks to Wim Schuermann.
This commit is contained in:
Paul Beckingham 2015-08-05 20:50:56 -04:00
parent 9951231804
commit 7ec2992ca8
2 changed files with 4 additions and 5 deletions

View file

@ -72,6 +72,7 @@
- TW-1600 Filtering "regressions"(?) in task-2.4.3, task-2.4.4 (thanks to Ralph
Bean).
- TW-1609 In 'urgency<10', 10 is interpreted as an ID (thanks to Wim Schuermann).
- TW-1611 soww weirdness (thanks to Wim Schuermann).
- TW-1612 Spurious whitespace added in task descriptions around certain symbols
(thanks to Denis Kasak).
- TW-1615 Japanese translation for Taskwarrior(150513) (thanks to ribbon).

View file

@ -335,12 +335,10 @@ bool namedDates (const std::string& name, Variant& value)
else if (closeEnough ("soww", name, minimum))
{
t->tm_hour = t->tm_min = t->tm_sec = 0;
int extra = (t->tm_wday - 1) * 86400;
if (extra > 0)
extra += 7 * 86400;
int days = (8 - t->tm_wday) % 7;
int extra = days * 86400;
t->tm_isdst = -1;
value = Variant (mktime (t) - extra, Variant::type_date);
value = Variant (mktime (t) + extra, Variant::type_date);
}
else if (closeEnough ("eoww", name, minimum))