34 friend std::ostream &
operator<<( std::ostream & str,
const Date & obj );
65 explicit Date(
const std::string & seconds_r );
73 Date(
const std::string & date_str,
const std::string & format );
75 Date(
const std::string & date_str,
const std::string & format,
TimeBase base_r );
79 { return ::time( 0 ); }
112 std::string
form(
const std::string & format_r )
const
115 std::string
form(
const std::string & format_r,
TimeBase base_r )
const;
121 {
return form(
"%c" ); }
127 {
return form(
"%s" ); }
169 {
return print( DateFormat::calendar, timeFormat_r, timeZoneFormat_r, base_r ); }
172 {
return print( dateFormat_r, TimeFormat::seconds, timeZoneFormat_r, base_r ); }
175 {
return print( dateFormat_r, timeFormat_r, TimeZoneFormat::name, base_r ); }
178 {
return print( DateFormat::calendar, TimeFormat::seconds, timeZoneFormat_r, base_r ); }
181 {
return print( DateFormat::calendar, timeFormat_r, TimeZoneFormat::name, base_r ); }
184 {
return print( dateFormat_r, TimeFormat::seconds, TimeZoneFormat::name, base_r ); }
187 {
return print( DateFormat::calendar, TimeFormat::seconds, TimeZoneFormat::name, base_r ); }
193 {
return print( dateFormat_r, TimeFormat::none, TimeZoneFormat::none, base_r ); }
196 {
return printDate( DateFormat::calendar, base_r ); }
202 {
return print( DateFormat::none, timeFormat_r, timeZoneFormat_r, base_r ); }
205 {
return printTime( TimeFormat::seconds, timeZoneFormat_r, base_r ); }
208 {
return printTime( timeFormat_r, TimeZoneFormat::name, base_r ); }
211 {
return printTime( TimeFormat::seconds, TimeZoneFormat::name, base_r ); }
221 {
return printISO( DateFormat::calendar, timeFormat_r, timeZoneFormat_r, base_r ); }
224 {
return printISO( dateFormat_r, TimeFormat::seconds, timeZoneFormat_r, base_r ); }
227 {
return printISO( dateFormat_r, timeFormat_r, TimeZoneFormat::name, base_r ); }
230 {
return printISO( DateFormat::calendar, TimeFormat::seconds, timeZoneFormat_r, base_r ); }
233 {
return printISO( DateFormat::calendar, timeFormat_r, TimeZoneFormat::name, base_r ); }
236 {
return printISO( dateFormat_r, TimeFormat::seconds, TimeZoneFormat::name, base_r ); }
239 {
return printISO( DateFormat::calendar, TimeFormat::seconds, TimeZoneFormat::name, base_r ); }
258 std::ostream &
dumpAsXmlOn( std::ostream & str,
const Date & obj,
const std::string & name_r =
"date" );
271 #endif // ZYPP_DATE_H