ISO8601d: Added ::daysInYear and tests

This commit is contained in:
Paul Beckingham 2015-09-26 13:57:10 -04:00
parent d8eb0ac0da
commit 965415d7a4
3 changed files with 13 additions and 1 deletions

View file

@ -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)

View file

@ -46,6 +46,7 @@ public:
static bool leapYear (int);
static int daysInMonth (int, int);
static int daysInYear (int);
static int dayOfWeek (const std::string&);