mirror of
https://github.com/HowardHinnant/date.git
synced 2024-12-26 07:53:16 +08:00
parent
155c6b9e76
commit
51ce7e1310
@ -603,6 +603,7 @@ static
|
|||||||
std::string
|
std::string
|
||||||
get_alpha_word(std::istream& in)
|
get_alpha_word(std::istream& in)
|
||||||
{
|
{
|
||||||
|
ws(in);
|
||||||
std::string s;
|
std::string s;
|
||||||
while (!in.eof() && std::isalpha(in.peek()))
|
while (!in.eof() && std::isalpha(in.peek()))
|
||||||
s.push_back(static_cast<char>(in.get()));
|
s.push_back(static_cast<char>(in.get()));
|
||||||
@ -2817,7 +2818,8 @@ find_read_and_leap_seconds()
|
|||||||
iss.exceptions(std::ios::failbit | std::ios::badbit);
|
iss.exceptions(std::ios::failbit | std::ios::badbit);
|
||||||
std::string word;
|
std::string word;
|
||||||
iss >> word;
|
iss >> word;
|
||||||
if (word == "Leap")
|
tolower(word);
|
||||||
|
if (is_prefix_of(word, "leap"))
|
||||||
{
|
{
|
||||||
int y, m, d;
|
int y, m, d;
|
||||||
iss >> y;
|
iss >> y;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user