TW-1630: "Due" parsing behavior seems inconsistent
- Thanks to Jim B.
This commit is contained in:
@@ -81,6 +81,7 @@
|
||||
- TW-1627 'mon' is replaced with date in project field (thanks to James Cline).
|
||||
- TW-1629 Descriptions often get overwritten with "( or )" (thanks to Jeremy
|
||||
John Reeder).
|
||||
- TW-1630 "Due" parsing behavior seems inconsistent (thanks to Jim B).
|
||||
- TW-1632 Japanese translation for Taskwarrior(150713) (thanks to ribbon).
|
||||
- TW-1634 due.not:<date> excludes only tasks scheduled at mitnight (thanks to
|
||||
Tomas Babej).
|
||||
|
||||
@@ -1942,11 +1942,32 @@ void Variant::cast (const enum type new_type)
|
||||
pos == _string.length ())
|
||||
{
|
||||
_date = (time_t) iso;
|
||||
break;
|
||||
}
|
||||
else if (dateFormat != "")
|
||||
|
||||
pos = 0;
|
||||
ISO8601p isop;
|
||||
if (isoEnabled &&
|
||||
isop.parse (_string, pos) &&
|
||||
pos == _string.length ())
|
||||
{
|
||||
Date d (_string, dateFormat);
|
||||
_date = d.toEpoch ();
|
||||
_date = Date ().toEpoch () + (time_t) isop;
|
||||
break;
|
||||
}
|
||||
|
||||
pos = 0;
|
||||
Duration dur;
|
||||
if (dur.parse (_string, pos) &&
|
||||
pos == _string.length ())
|
||||
{
|
||||
_date = Date ().toEpoch () + (time_t) dur;
|
||||
break;
|
||||
}
|
||||
|
||||
if (dateFormat != "")
|
||||
{
|
||||
_date = Date (_string, dateFormat).toEpoch ();
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user