ISO8601: Prepared ::parse method for its new role of parsing all dates
This commit is contained in:
@@ -167,7 +167,10 @@ ISO8601d::operator time_t () const
|
||||
// | 'R' [n] '/' datetime '/' datetime # start end
|
||||
// ;
|
||||
//
|
||||
bool ISO8601d::parse (const std::string& input, std::string::size_type& start)
|
||||
bool ISO8601d::parse (
|
||||
const std::string& input,
|
||||
std::string::size_type& start,
|
||||
const std::string& format /* = "" */)
|
||||
{
|
||||
auto i = start;
|
||||
Nibbler n (input.substr (i));
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
// http://www.opensource.org/licenses/mit-license.php
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef INCLUDED_ISO8601
|
||||
#define INCLUDED_ISO8601
|
||||
|
||||
@@ -38,7 +39,7 @@ public:
|
||||
ISO8601d (const ISO8601d&); // Unimplemented
|
||||
ISO8601d& operator= (const ISO8601d&); // Unimplemented
|
||||
operator time_t () const;
|
||||
bool parse (const std::string&, std::string::size_type&);
|
||||
bool parse (const std::string&, std::string::size_type&, const std::string& format = "");
|
||||
void clear ();
|
||||
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user