mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
TW-1522
- TW-1522 Date format doesn't like hyphens (thanks to Scott Carter).
This commit is contained in:
parent
4865269630
commit
6626207ad1
11 changed files with 30 additions and 10 deletions
|
@ -41,6 +41,7 @@
|
|||
std::string Variant::dateFormat = "";
|
||||
bool Variant::searchCaseSensitive = true;
|
||||
bool Variant::searchUsingRegex = true;
|
||||
bool Variant::isoEnabled = true;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
Variant::Variant ()
|
||||
|
@ -2065,7 +2066,8 @@ void Variant::cast (const enum type new_type)
|
|||
|
||||
ISO8601d iso;
|
||||
std::string::size_type pos = 0;
|
||||
if (iso.parse (_string, pos) &&
|
||||
if (isoEnabled &&
|
||||
iso.parse (_string, pos) &&
|
||||
pos == _string.length ())
|
||||
{
|
||||
_date = (time_t) iso;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue