mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
Date/ISO8601
- Changed the order of parsing from ISO, Date to Date, ISO. This favors the old dateformat mechanism more than the new one. One day this will flip.
This commit is contained in:
parent
483c1b5787
commit
6706d1b955
3 changed files with 11 additions and 11 deletions
|
@ -1678,21 +1678,21 @@ void Variant::cast (const enum type new_type)
|
|||
case type_duration:
|
||||
{
|
||||
_duration = 0;
|
||||
ISO8601p iso;
|
||||
Duration dur;
|
||||
std::string::size_type pos = 0;
|
||||
if (iso.parse (_string, pos) &&
|
||||
if (dur.parse (_string, pos) &&
|
||||
pos == _string.length ())
|
||||
{
|
||||
_duration = (time_t) iso;
|
||||
_duration = (time_t) dur;
|
||||
}
|
||||
else
|
||||
{
|
||||
Duration dur;
|
||||
ISO8601p iso;
|
||||
pos = 0;
|
||||
if (dur.parse (_string, pos) &&
|
||||
if (iso.parse (_string, pos) &&
|
||||
pos == _string.length ())
|
||||
{
|
||||
_duration = (time_t) dur;
|
||||
_duration = (time_t) iso;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue