mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-20 13:23:08 +02:00
ISO8601d: Added ::dayOfYear
This commit is contained in:
parent
ac428e1f1a
commit
5ed0d13194
2 changed files with 8 additions and 0 deletions
|
@ -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 ();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue