ISO8601d: Added ::month

This commit is contained in:
Paul Beckingham 2015-09-26 14:16:38 -04:00
parent d351c9faf2
commit 24ff570427
2 changed files with 9 additions and 0 deletions

View file

@ -906,6 +906,13 @@ int ISO8601d::length (const std::string& format)
return len;
}
////////////////////////////////////////////////////////////////////////////////
int ISO8601d::month () const
{
struct tm* t = localtime (&_date);
return t->tm_mon + 1;
}
////////////////////////////////////////////////////////////////////////////////
void ISO8601p::clear ()
{

View file

@ -53,6 +53,8 @@ public:
static int length (const std::string&);
int month () const;
private:
void clear ();
bool parse_date_time (Nibbler&);