ISO8601d: Added ::dayOfYear

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

View File

@@ -961,6 +961,13 @@ int ISO8601d::dayOfWeek () const
return t->tm_wday;
}
////////////////////////////////////////////////////////////////////////////////
int ISO8601d::dayOfYear () const
{
struct tm* t = localtime (&_date);
return t->tm_yday + 1;
}
////////////////////////////////////////////////////////////////////////////////
void ISO8601p::clear ()
{