* to parse strings of the required format (those that include time zones).
*
* See http://www.w3.org/TR/xmlschema-2/#dateTime
+ *
+ * Note that operator== for this class will return true for times that have different
+ * offsets but are the same actual time.
*/
class LocalTime
{
, _offset(offset)
{}
- /** @return A string of the form 2013-01-05T18:06:59+04:00 or 2013-01-05T18:06:59.123+04:00 */
- std::string as_string (bool with_millisecond = false) const;
+ /** @return A string of the form 2013-01-05T18:06:59+04:00, 2013-01-05T18:06:59.123+04:00
+ * 2013-01-05T18:06:59 or 2013-01-05T18:06:59.123
+ */
+ std::string as_string(bool with_millisecond = false, bool with_timezone = true) const;
/** @return The date in the form YYYY-MM-DD */
std::string date () const;
bool operator== (LocalTime const & other) const;
bool operator!= (LocalTime const & other) const;
bool operator< (LocalTime const & other) const;
+ bool operator<=(LocalTime const & other) const;
bool operator>(LocalTime const & other) const;
+ bool operator>=(LocalTime const & other) const;
private:
friend struct ::local_time_basic_test;