ISO8601d: Added ::dayOfYear
This commit is contained in:
@@ -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 ()
|
||||
{
|
||||
|
||||
@@ -59,6 +59,7 @@ public:
|
||||
int year () const;
|
||||
int weekOfYear (int) const;
|
||||
int dayOfWeek () const;
|
||||
int dayOfYear () const;
|
||||
|
||||
private:
|
||||
void clear ();
|
||||
|
||||
Reference in New Issue
Block a user