73 GTime(
const double& time,
const std::string& unit =
"sec");
76 explicit GTime(
const std::string& time);
88 double jd(
void)
const;
89 double jd(
const std::string& timesys)
const;
90 double mjd(
void)
const;
91 double mjd(
const std::string& timesys)
const;
92 const double&
secs(
void)
const;
93 double secs(
const std::string& timesys)
const;
94 double days(
void)
const;
95 double days(
const std::string& timesys)
const;
98 std::string
utc(
const int& precision = 0)
const;
99 double gmst(
void)
const;
100 double gast(
void)
const;
101 double lmst(
const double& geolon)
const;
102 double last(
const double& geolon)
const;
104 double utc2tt(
void)
const;
106 void jd(
const double& time);
107 void jd(
const double& time,
const std::string& timesys);
108 void mjd(
const double& time);
109 void mjd(
const double& time,
const std::string& timesys);
110 void secs(
const double& seconds);
111 void secs(
const double& seconds,
const std::string& timesys);
112 void days(
const double& days);
113 void days(
const double& days,
const std::string& timesys);
114 void utc(
const std::string& time);
117 void set(
const std::string& time);
213 (((year % 100) != 0) && ((year % 4) == 0)));
214 return (is_leap_year);
std::string extract_timesys(const std::string &time) const
Extract time system from time string.
friend bool operator<=(const GTime &a, const GTime &b)
Check if time is smaller than or equal to other time.
friend bool operator<(const GTime &a, const GTime &b)
Check if time is smaller than other time.
void init_members(void)
Initialise class members.
void now(void)
Set time to current time.
GTimeReference reference(void) const
Returns native time reference.
friend GTime operator-(const GTime &time, const double &seconds)
Subtract seconds from time.
double lmst(const double &geolon) const
Return local mean sidereal time in hours in a day.
void copy_members(const GTime &time)
Copy class members.
Definition of interface for all GammaLib classes.
friend bool operator==(const GTime &a, const GTime &b)
Check if times are equal.
void clear(void)
Clear time.
friend bool operator>=(const GTime &a, const GTime &b)
Check if time is larger than or equal to other time.
friend bool operator!=(const GTime &a, const GTime &b)
Check if times are not equal.
GTime & operator-=(const double &seconds)
Subtract seconds from time.
friend GTime operator+(const GTime &time, const double &seconds)
Add seconds to time.
GArf operator+(const GArf &a, const GArf &b)
Auxiliary Response File addition operator friend.
double extract_timeval(const std::string &time) const
Extract time value from time string.
double jd(void) const
Return time in Julian Days (TT)
bool is_leap_year(const int &year) const
Signals if year is a leap year.
bool operator<=(const GEnergy &a, const GEnergy &b)
Energy smaller than or equal to operator friend.
bool operator<(const GEnergy &a, const GEnergy &b)
Energy smaller than operator friend.
virtual ~GTime(void)
Destructor.
std::string classname(void) const
Return class name.
void free_members(void)
Delete class members.
GTime(void)
Void constructor.
Interface class for all GammaLib classes.
Time reference class interface definition.
double leap_seconds(void) const
Return number of leap seconds for current time.
std::string print(const GChatter &chatter=NORMAL) const
Print time.
GTime * clone(void) const
Clone time.
double gmst(void) const
Return Greenwich mean sidereal time in hours in a day.
const double & secs(void) const
Return time in seconds in native reference (TT)
double last(const double &geolon) const
Return local apparent sidereal time in hours in a day.
GTime & operator=(const GTime &time)
Assignment operator.
bool operator>=(const GEnergy &a, const GEnergy &b)
Energy larger than or equal to operator friend.
double gast(void) const
Return Greenwich apparent sidereal time in hours in a day.
friend bool operator>(const GTime &a, const GTime &b)
Check if time is larger than other time.
GTime & operator+=(const double &seconds)
Add seconds to time.
Implements a time reference.
double mjd(void) const
Return time in Modified Julian Days (TT)
bool operator>(const GEnergy &a, const GEnergy &b)
Energy larger than operator friend.
bool operator==(const GEnergy &a, const GEnergy &b)
Energy equality operator friend.
int days_in_year(const int &year) const
Returns number of days in year.
GArf operator-(const GArf &a, const GArf &b)
Auxiliary Response File subtraction operator friend.
double julian_epoch(void) const
Return Julian epoch in native reference (TT)
std::string utc(const int &precision=0) const
Return time as string in UTC time system.
bool operator!=(const GEbounds &a, const GEbounds &b)
Energy boundaries inequality operator friend.
void set(const double &time, const GTimeReference &ref)
Set time given in specified reference.
double utc2tt(void) const
Return time difference between UTC and TT (seconds)
double convert(const GTimeReference &ref) const
Return time in specified reference.
double days(void) const
Return time in days in native reference (TT)
double m_time
Time in seconds in native reference (TT)