1 #ifndef _utl_UTCDate_h_
2 #define _utl_UTCDate_h_
40 {
Set(year, month, day); }
42 void Set(
const int year,
const int month,
const int day);
79 std::istream&
Parse(std::istream&
is,
const bool zone =
true);
83 {
return (!(year%4) && (year%100)) || !(year%400); }
125 {
return date.
Parse(is); }
std::time_t GetUnixSecond() const
Relative to Unix epoch (1 Jan 1970 00:00:00 UTC) without leap corrections.
UTCDate(const int year, const int month, const int day)
Jan = 1, Dec = 12.
std::istream & operator>>(std::istream &is, SVector< n, T > &v)
static bool IsLeapYear(const int year)
static const char *const fgMonthNames[]
std::string GetInAugerFormat() const
void Set(const int year, const int month, const int day)
bool is(const double a, const double b)
std::istream & Parse(std::istream &is, const bool zone=true)
Stream & operator<<(Stream &s, MessageLoggerConfig &mlc)
Applies the configuration to the given stream.
static UTCDate GetUnixEpoch()
bool operator==(const UTCDate &d) const
static int NumberOfDaysInMonth(const int year, const int month)
static UTCDate GetGPSEpoch()
bool operator!=(const UTCDate &d) const
std::string GetInXMLFormat() const
friend std::istream & operator>>(std::istream &, UTCDate &)
read from XML schema type "Date" (any timezone) compliant format
std::string GetInXMLFormatZone(const char *const zone) const