mirror of
https://github.com/HowardHinnant/date.git
synced 2025-08-04 21:24:26 +02:00
Add %F to parse
This commit is contained in:
14
date.h
14
date.h
@@ -4157,6 +4157,20 @@ parse(std::basic_istream<CharT, Traits>& is,
|
|||||||
command = true;
|
command = true;
|
||||||
modified = false;
|
modified = false;
|
||||||
break;
|
break;
|
||||||
|
case 'F':
|
||||||
|
if (command && !modified)
|
||||||
|
{
|
||||||
|
f.get(is, 0, is, err, &tm, b, i-1);
|
||||||
|
b = i+1;
|
||||||
|
if ((err & ios_base::failbit) == 0)
|
||||||
|
{
|
||||||
|
const CharT ymd[] = {'%', 'Y', '-', '%', 'm', '-', '%', 'd'};
|
||||||
|
f.get(is, 0, is, err, &tm, ymd, ymd+8);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
command = false;
|
||||||
|
modified = false;
|
||||||
|
break;
|
||||||
case 'O':
|
case 'O':
|
||||||
case 'E':
|
case 'E':
|
||||||
modified = true;
|
modified = true;
|
||||||
|
Reference in New Issue
Block a user