ISO8601d: Added ::hour, ::minute, ::second

This commit is contained in:
Paul Beckingham 2015-09-26 14:25:19 -04:00
parent 5ed0d13194
commit 7164215146
2 changed files with 24 additions and 0 deletions

View file

@ -968,6 +968,27 @@ int ISO8601d::dayOfYear () const
return t->tm_yday + 1; return t->tm_yday + 1;
} }
////////////////////////////////////////////////////////////////////////////////
int ISO8601d::hour () const
{
struct tm* t = localtime (&_date);
return t->tm_hour;
}
////////////////////////////////////////////////////////////////////////////////
int ISO8601d::minute () const
{
struct tm* t = localtime (&_date);
return t->tm_min;
}
////////////////////////////////////////////////////////////////////////////////
int ISO8601d::second () const
{
struct tm* t = localtime (&_date);
return t->tm_sec;
}
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
void ISO8601p::clear () void ISO8601p::clear ()
{ {

View file

@ -60,6 +60,9 @@ public:
int weekOfYear (int) const; int weekOfYear (int) const;
int dayOfWeek () const; int dayOfWeek () const;
int dayOfYear () const; int dayOfYear () const;
int hour () const;
int minute () const;
int second () const;
private: private:
void clear (); void clear ();