ISO8601d: Added ::year

This commit is contained in:
Paul Beckingham 2015-09-26 14:21:42 -04:00
parent eeac423fd6
commit af81b24d92
2 changed files with 8 additions and 0 deletions

View file

@ -926,6 +926,13 @@ int ISO8601d::day () const
return t->tm_mday; return t->tm_mday;
} }
////////////////////////////////////////////////////////////////////////////////
int ISO8601d::year () const
{
struct tm* t = localtime (&_date);
return t->tm_year + 1900;
}
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
void ISO8601p::clear () void ISO8601p::clear ()
{ {

View file

@ -56,6 +56,7 @@ public:
int month () const; int month () const;
int week () const; int week () const;
int day () const; int day () const;
int year () const;
private: private:
void clear (); void clear ();