FACT++  1.0
double Time::Mjd ( ) const

Get the current MJD. Note that this involves conversion to double. So converting forth and back many many times might results in drifts.

Returns
Modified Julian Date

Definition at line 180 of file Time.cc.

References SecondsOfDay().

Referenced by GetNextSunRise(), and GetPrevSunRise().

181 {
182  return date().modjulian_day()+SecondsOfDay()/(24*60*60);
183 
184  /*
185  const time_duration mjd = *this - ptime(fUnixOffset);
186  const double sec = mjd.total_seconds()+mjd.fractional_seconds()/1e6;
187  return sec/(24*60*60)+40587;
188  */
189 }
double SecondsOfDay() const
Definition: Time.cc:161

+ Here is the call graph for this function:

+ Here is the caller graph for this function: