GothenburgBitFactory / taskwarrior

Taskwarrior - Command line Task Management
https://taskwarrior.org
MIT License
4.37k stars 297 forks source link

[TW-1814] ISO8601 week format does not accept "day 7" and "day 0" is weird #1834

Open taskwarrior opened 6 years ago

taskwarrior commented 6 years ago

Ellington Santos on 2016-06-07T12:30:52Z says:

$ t 138 mod due:2016-W23-7 '2016-W23-7' is not a valid date in the 'Y-WV-w' format.

But it accepts day 0 incorrectly:

$ t 138 mod due:2016-W23-0 Modifying task 138 'Tentar entrar nas gigs not prod e atualizar para 1.1.0'. Modified 1 task.

$ t 138 [...] Due 2016-06-05 00:00:00 [...]

$t undo

The last modification was made 6/7/2016

         Prior Values          Current Values                                        

due 2016-W22-0T00:00

taskwarrior commented 6 years ago

Migrated metadata:

Created: 2016-06-07T12:30:52Z
Modified: 2016-06-07T21:21:56Z
taskwarrior commented 6 years ago

Paul Beckingham on 2016-06-07T21:21:41Z says:

That bug is fixed in libshared, but Taskwarrior doesn't use libshared yet. Keeping this issue open until it does.

tbabej commented 3 years ago

Taskwarrior is using libshared now, but this problem is still present. The parsed _weekday values are directly intepreted, instead of being decreased by 1.

In general, it looks like the value of configuration variable weekstart is not correctly handled in these expressions. This will (possibly) need to be fixed as well.