mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Date string parser. Move statement
This commit is contained in:
parent
c68a96de30
commit
282d8ef080
@ -107,10 +107,10 @@ bool RiaDateStringParser::tryParseDayFirst(const std::string& s, int& year, int&
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RiaDateStringParser::tryParseYear(const std::string& s, int &year)
|
||||
{
|
||||
auto today = QDate::currentDate();
|
||||
if (containsAlphabetic(s)) return false;
|
||||
try
|
||||
{
|
||||
auto today = QDate::currentDate();
|
||||
int y = std::stoi(s);
|
||||
if (y > 1970 && y <= today.year())
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user