mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
Variant: Migraded from ISO8601d to Datetime
This commit is contained in:
parent
c0d5d5974e
commit
434e95f560
1 changed files with 2 additions and 3 deletions
|
@ -31,7 +31,6 @@
|
|||
#include <math.h>
|
||||
#include <stdlib.h>
|
||||
#include <Variant.h>
|
||||
#include <ISO8601.h>
|
||||
#include <Datetime.h>
|
||||
#include <Duration.h>
|
||||
#include <Lexer.h>
|
||||
|
@ -1872,7 +1871,7 @@ void Variant::cast (const enum type new_type)
|
|||
case type_date:
|
||||
{
|
||||
_date = 0;
|
||||
ISO8601d iso;
|
||||
Datetime iso;
|
||||
std::string::size_type pos = 0;
|
||||
if (iso.parse (_string, pos, dateFormat) &&
|
||||
pos == _string.length ())
|
||||
|
@ -1892,7 +1891,7 @@ void Variant::cast (const enum type new_type)
|
|||
|
||||
if (dateFormat != "")
|
||||
{
|
||||
_date = ISO8601d (_string, dateFormat).toEpoch ();
|
||||
_date = Datetime (_string, dateFormat).toEpoch ();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue