mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
TW-1423
- TW-1423 Using the date February 29th, in a non leap year does not fail well (thanks to Black Ops Testing).
This commit is contained in:
parent
2c1f18bf26
commit
84dc7dd245
3 changed files with 8 additions and 2 deletions
|
@ -2008,6 +2008,11 @@ void Task::modify (modType type, bool text_required /* = false */)
|
|||
context.debug (label + name + " <-- '" + format ("{1}", v.get_date ()) + "' <-- '" + (std::string) v + "' <-- '" + value + "'");
|
||||
}
|
||||
|
||||
// If a date doesn't parse (2/29/2014) then it evaluates to zero.
|
||||
if (value != "" &&
|
||||
v.get_date () == 0)
|
||||
throw format (STRING_DATE_INVALID_FORMAT, value, Variant::dateFormat);
|
||||
|
||||
set (name, v.get_date ());
|
||||
++modCount;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue