forked from HowardHinnant/date
Allow parsing %Ez to parse only 1 hour digit.
This commit is contained in:
2
date.h
2
date.h
@ -5986,7 +5986,7 @@ from_stream(std::basic_istream<CharT, Traits>& is, const CharT* fmt,
|
|||||||
if (modified == CharT{})
|
if (modified == CharT{})
|
||||||
read(is, rs{H, 2, 2}, ru{M, 2, 2});
|
read(is, rs{H, 2, 2}, ru{M, 2, 2});
|
||||||
else
|
else
|
||||||
read(is, rs{H, 2, 2}, CharT{':'}, ru{M, 2, 2});
|
read(is, rs{H, 1, 2}, CharT{':'}, ru{M, 2, 2});
|
||||||
if (!is.fail())
|
if (!is.fail())
|
||||||
temp_offset = hours{H} + minutes{M};
|
temp_offset = hours{H} + minutes{M};
|
||||||
command = nullptr;
|
command = nullptr;
|
||||||
|
Reference in New Issue
Block a user