Commit a5aded1b authored by remi cresson's avatar remi cresson
Browse files

ENH: dates can be retrieved as string from a file

parent ad4cc232
......@@ -142,10 +142,10 @@ std::cout << "GetDatesFromStringVector" << std::endl;
}
/*
* Retrieve the vector of dates from an ASCII file.
* Retrieve the vector of dates (as string) from an ASCII file.
* Format of dates must be YYYYMMDD
*/
DatesType GetDatesFromFile(std::string filename)
std::vector<std::string> GetDatesAsStringFromFile(std::string filename)
{
std::vector<std::string> list;
ifstream file(filename);
......@@ -158,6 +158,18 @@ DatesType GetDatesFromFile(std::string filename)
std::istream_iterator<std::string>(),
std::back_inserter(list));
return list;
}
/*
* Retrieve the vector of dates from an ASCII file.
* Format of dates must be YYYYMMDD
*/
DatesType GetDatesFromFile(std::string filename)
{
std::vector<std::string> list = GetDatesAsStringFromFile(filename);
return GetDatesFromStringVector(list);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment