ISO8601d: Added ::startOfDay
This commit is contained in:
@@ -840,6 +840,12 @@ bool ISO8601p::parse (const std::string& input, std::string::size_type& start)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
ISO8601d ISO8601d::startOfDay () const
|
||||||
|
{
|
||||||
|
return ISO8601d (month (), day (), year ());
|
||||||
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// Static
|
// Static
|
||||||
bool ISO8601d::leapYear (int year)
|
bool ISO8601d::leapYear (int year)
|
||||||
|
|||||||
@@ -43,10 +43,11 @@ public:
|
|||||||
ISO8601d (const int, const int, const int, const int, const int, const int);
|
ISO8601d (const int, const int, const int, const int, const int, const int);
|
||||||
~ISO8601d ();
|
~ISO8601d ();
|
||||||
ISO8601d (const ISO8601d&); // Unimplemented
|
ISO8601d (const ISO8601d&); // Unimplemented
|
||||||
ISO8601d& operator= (const ISO8601d&); // Unimplemented
|
|
||||||
operator time_t () const;
|
operator time_t () const;
|
||||||
bool parse (const std::string&, std::string::size_type&, const std::string& format = "");
|
bool parse (const std::string&, std::string::size_type&, const std::string& format = "");
|
||||||
|
|
||||||
|
ISO8601d startOfDay () const;
|
||||||
|
|
||||||
static bool leapYear (int);
|
static bool leapYear (int);
|
||||||
static int daysInMonth (int, int);
|
static int daysInMonth (int, int);
|
||||||
static int daysInYear (int);
|
static int daysInYear (int);
|
||||||
|
|||||||
Reference in New Issue
Block a user