33 friend std::ostream &
operator<<( std::ostream & str,
const Date & obj );
63 Date(
const std::string & seconds_r );
71 Date(
const std::string & date_str,
const std::string & format );
73 Date(
const std::string & date_str,
const std::string & format,
TimeBase base_r );
77 { return ::time( 0 ); }
107 std::string
form(
const std::string & format_r )
const
110 std::string
form(
const std::string & format_r,
TimeBase base_r )
const;
116 {
return form(
"%c" ); }
122 {
return form(
"%s" ); }
147 #endif // ZYPP_DATE_H
static const ValueType day
Date & operator+=(const time_t rhs)
friend std::ostream & operator<<(std::ostream &str, const Date &obj)
static const ValueType minute
static const ValueType month31
const std::string & msg() const
Return the message string provided to the ctor.
Date(ValueType date_r)
Ctor taking time_t value.
static const ValueType month30
Date & operator/=(const time_t rhs)
static const ValueType month
static const ValueType month29
ValueType _date
Calendar time.
Store and operate on date (time_t).
static const ValueType year365
std::ostream & operator<<(std::ostream &str, const Date &obj)
static const ValueType month28
static const ValueType year
Date & operator*=(const time_t rhs)
static const ValueType hour
Base class for Exception.
std::string form(const std::string &format_r) const
Return string representation according to format as localtime.
static Date now()
Return the current time.
std::string asString() const
Default string representation of Date.
std::string asSeconds() const
Convert to string representation of calendar time in numeric form (like "1029255142").
static const ValueType year366
Date & operator-=(const time_t rhs)
static const ValueType second