changed: when parsing date skip 'Z' character if exists (iso format)

git-svn-id: svn://ttmath.org/publicrep/pikotools/trunk@1126 e52654a7-88a9-db11-a3e9-0013d4bc506e
master
Tomasz Sowa 4 years ago
parent 239e1e4674
commit 8e9f83e377

@ -800,6 +800,7 @@ bool Date::Parse(const CStringType * str, const CStringType ** str_after)
{
const CStringType * after;
bool result = false;
bool is_iso = false;
if( ParseYearMonthDay(str, &after) )
{
@ -811,10 +812,18 @@ bool result = false;
// https://en.wikipedia.org/wiki/ISO_8601
// at the moment skip the 'T' character only
after += 1;
is_iso = true;
}
if( ParseHourMinSec(after, &after) )
{
result = true;
if( is_iso && *after == 'Z' )
{
after += 1;
}
}
}
SetAfter(after, str_after);

Loading…
Cancel
Save