Go to the documentation of this file.
68 TimeSpan(
int days,
int hours,
int mins,
int secs,
int nsecs );
75 int lastHours()
const;
76 int lastMinutes()
const;
77 int lastSeconds()
const;
78 int lastNSeconds()
const;
258 static const int SECS_PER_DAY = 86400;
261 static const int SECS_PER_HOUR = 3600;
272 Time(
int year,
int month,
int day,
int hour,
int min,
int sec,
ValueType nsecs,
bool local =
true );
282 static Time current();
286 tm split(
bool local,
int* nsecpart = 0 )
const;
287 tm utc(
int* nsecpart = 0 )
const;
288 tm local(
int* nsecpart = 0 )
const;
290 int year(
bool local )
const;
291 int month(
bool local )
const;
292 int day(
bool local )
const;
293 int hour(
bool local )
const;
294 int minute(
bool local )
const;
295 int second(
bool local )
const;
297 int weekday(
bool local )
const;
298 bool isdst(
bool local )
const;
300 ValueType utcoffset(
int* daylight = 0 )
const;
301 const char* timezone(
int* daylight = 0 )
const;
308 std::string
format(
bool local, std::string spec =
"%c" )
const;
309 std::string nanoformat(
size_t minwidth = 1,
size_t maxwidth = 9 )
const;
311 static bool isLeap(
int year );
314 static unsigned toDosDate(
Time time );
315 static Time fromDosDate(
unsigned dosDate );
333 inline void TimeAssert(
bool cond, std::string_view
msg =
"time assertion failed" )
const {
friend bool operator>=(const Gaudi::Time &t1, const Gaudi::Time &t2)
friend bool operator<=(const Gaudi::TimeSpan &t1, const Gaudi::TimeSpan &t2)
Time()=default
Initialize an empty (zero) time value.
ValueType ns() const
Return the time span as nanoseconds.
friend Gaudi::TimeSpan operator-(const Gaudi::TimeSpan &ts1, const Gaudi::TimeSpan &ts2)
friend bool operator>(const Gaudi::TimeSpan &t1, const Gaudi::TimeSpan &t2)
friend bool operator==(const Gaudi::TimeSpan &t1, const Gaudi::TimeSpan &t2)
TimeSpan()=default
Initialize an empty (zero) time difference.
friend bool operator==(const Gaudi::Time &t1, const Gaudi::Time &t2)
GAUDI_API std::string format(const char *,...)
MsgStream format utility "a la sprintf(...)".
friend bool operator<(const Gaudi::TimeSpan &t1, const Gaudi::TimeSpan &t2)
This file provides a Grammar for the type Gaudi::Accumulators::Axis It allows to use that type from p...
friend bool operator>(const Gaudi::Time &t1, const Gaudi::Time &t2)
Months
Symbolic names for months.
void TimeAssert(bool cond, std::string_view msg="time assertion failed") const
TimeException(std::string Message="unspecified exception", std::string Tag="*Gaudi::Time*", StatusCode Code=StatusCode::FAILURE)
friend bool operator!=(const Gaudi::Time &t1, const Gaudi::Time &t2)
friend Gaudi::TimeSpan operator+(const Gaudi::TimeSpan &ts1, const Gaudi::TimeSpan &ts2)
constexpr static const auto FAILURE
friend bool operator<=(const Gaudi::Time &t1, const Gaudi::Time &t2)
friend bool operator>=(const Gaudi::TimeSpan &t1, const Gaudi::TimeSpan &t2)
friend bool operator!=(const Gaudi::TimeSpan &t1, const Gaudi::TimeSpan &t2)
friend bool operator<(const Gaudi::Time &t1, const Gaudi::Time &t2)