mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
ISO8601d: Added ::daysInYear and tests
This commit is contained in:
parent
d8eb0ac0da
commit
965415d7a4
3 changed files with 13 additions and 1 deletions
|
@ -818,6 +818,13 @@ int ISO8601d::daysInMonth (int month, int year)
|
|||
return days[month - 1];
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Static
|
||||
int ISO8601d::daysInYear (int year)
|
||||
{
|
||||
return ISO8601d::leapYear (year) ? 366 : 365;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Static
|
||||
int ISO8601d::dayOfWeek (const std::string& input)
|
||||
|
|
|
@ -46,6 +46,7 @@ public:
|
|||
|
||||
static bool leapYear (int);
|
||||
static int daysInMonth (int, int);
|
||||
static int daysInYear (int);
|
||||
|
||||
static int dayOfWeek (const std::string&);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue