mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-28 22:47:20 +02:00
Date
- Correctly performs Nibbler save/restore for parse attempts.
This commit is contained in:
parent
92b91a3141
commit
9b03e8f9f7
1 changed files with 3 additions and 0 deletions
|
@ -143,16 +143,19 @@ Date::Date (
|
||||||
|
|
||||||
// Parse a formatted date.
|
// Parse a formatted date.
|
||||||
Nibbler n (input);
|
Nibbler n (input);
|
||||||
|
n.save ();
|
||||||
#ifdef NIBBLER_FEATURE_DATE
|
#ifdef NIBBLER_FEATURE_DATE
|
||||||
if (n.getDate (format, _t) && n.depleted ())
|
if (n.getDate (format, _t) && n.depleted ())
|
||||||
return;
|
return;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Parse an ISO date.
|
// Parse an ISO date.
|
||||||
|
n.restore ();
|
||||||
if (iso && n.getDateISO (_t) && n.depleted ())
|
if (iso && n.getDateISO (_t) && n.depleted ())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// Perhaps it is an epoch date, in string form?
|
// Perhaps it is an epoch date, in string form?
|
||||||
|
n.restore ();
|
||||||
if (epoch && isEpoch (input))
|
if (epoch && isEpoch (input))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue