#include <time.hpp>
Definition at line 49 of file time.hpp.
Public Member Functions | |
void | from_gregorian_string (const string &) |
double & | get_jdn () |
const double & | get_jdn () const |
julian_day (const time_t &t) | |
julian_day (const double &jdn) | |
julian_day () | |
string | to_gregorian_string () const |
time_t | to_time_t () const |
Static Public Member Functions | |
static julian_day | now () |
Static Public Attributes | |
static const double | J1970 = 2440587.5 |
Julian day number at UNIX epoch, 1970-01-01. | |
static const double | JDAY = 86400.0 |
Number of seconds in a Julian day. | |
Private Attributes | |
double | jdn |
julian_day | ( | ) |
julian_day | ( | const double & | jdn | ) | [explicit] |
julian_day | ( | const time_t & | t | ) | [explicit] |
void from_gregorian_string | ( | const string & | s | ) |
Definition at line 164 of file time.cpp.
References info::day, info::hour, info::minute, info::month, info::second, string::w_string(), and info::year.
Referenced by datetime_box::recalc_jdn().
const double& get_jdn | ( | ) | const [inline] |
Definition at line 58 of file time.hpp.
Referenced by simulation::init_context(), and datetime_box::recalc_jdn().
julian_day now | ( | ) | [static] |
string to_gregorian_string | ( | ) | const |
Definition at line 155 of file time.cpp.
References info::day, string::format(), info::hour, info::minute, info::month, info::second, and info::year.
Referenced by datetime_box::recalc_text().
time_t to_time_t | ( | ) | const |
Definition at line 68 of file time.cpp.
References julian_day::J1970, julian_day::JDAY, and julian_day::jdn.
Referenced by simulation::simulation().
const double J1970 = 2440587.5 [static] |
Julian day number at UNIX epoch, 1970-01-01.
Definition at line 66 of file time.hpp.
Referenced by julian_day::to_time_t().
const double JDAY = 86400.0 [static] |
Number of seconds in a Julian day.
Definition at line 67 of file time.hpp.
Referenced by julian_day::to_time_t(), and simulation::update_context().
double jdn [private] |