Represents an instance in time.
More...
#include <DateTime.h>
|
| DateTime () |
|
| DateTime (int64_t ticks) |
|
| DateTime (unsigned int year, double doy) |
|
| DateTime (int year, int month, int day) |
|
| DateTime (int year, int month, int day, int hour, int minute, int second) |
|
void | Initialise (int year, int month, int day, int hour, int minute, int second, int microsecond) |
|
int | DayOfYear (int year, int month, int day) const |
|
double | AbsoluteDays (unsigned int year, double doy) const |
|
int | AbsoluteDays (int year, int month, int day) const |
|
TimeSpan | TimeOfDay () const |
|
int | DayOfWeek () const |
|
bool | Equals (const DateTime &dt) const |
|
int | Compare (const DateTime &dt) const |
|
DateTime | AddYears (const int years) const |
|
DateTime | AddMonths (const int months) const |
|
DateTime | Add (const TimeSpan &t) const |
|
DateTime | AddDays (const double days) const |
|
DateTime | AddHours (const double hours) const |
|
DateTime | AddMinutes (const double minutes) const |
|
DateTime | AddSeconds (const double seconds) const |
|
DateTime | AddMicroseconds (const double microseconds) const |
|
DateTime | AddTicks (int64_t ticks) const |
|
int64_t | Ticks () const |
|
void | FromTicks (int &year, int &month, int &day) const |
|
int | Year () const |
|
int | Month () const |
|
int | Day () const |
|
int | Hour () const |
|
int | Minute () const |
|
int | Second () const |
|
int | Microsecond () const |
|
double | ToJulian () const |
|
double | ToGreenwichSiderealTime () const |
|
double | ToJ2000 () const |
|
double | ToLocalMeanSiderealTime (const double lon) const |
|
std::string | ToString () const |
|
Represents an instance in time.
Default contructor Initialise to 0001/01/01 00:00:00.000000
DateTime::DateTime |
( |
int64_t |
ticks | ) |
|
|
inline |
DateTime::DateTime |
( |
unsigned int |
year, |
|
|
double |
doy |
|
) |
| |
|
inline |
Constructor
- Parameters
-
[in] | year | the year |
[in] | doy | the day of the year |
DateTime::DateTime |
( |
int |
year, |
|
|
int |
month, |
|
|
int |
day |
|
) |
| |
|
inline |
Constructor
- Parameters
-
[in] | year | the year |
[in] | month | the month |
[in] | day | the day |
DateTime::DateTime |
( |
int |
year, |
|
|
int |
month, |
|
|
int |
day, |
|
|
int |
hour, |
|
|
int |
minute, |
|
|
int |
second |
|
) |
| |
|
inline |
Constructor
- Parameters
-
[in] | year | the year |
[in] | month | the month |
[in] | day | the day |
[in] | hour | the hour |
[in] | minute | the minute |
[in] | second | the second |
double DateTime::AbsoluteDays |
( |
unsigned int |
year, |
|
|
double |
doy |
|
) |
| const |
|
inline |
int DateTime::AbsoluteDays |
( |
int |
year, |
|
|
int |
month, |
|
|
int |
day |
|
) |
| const |
|
inline |
DateTime DateTime::AddDays |
( |
const double |
days | ) |
const |
|
inline |
DateTime DateTime::AddHours |
( |
const double |
hours | ) |
const |
|
inline |
DateTime DateTime::AddMicroseconds |
( |
const double |
microseconds | ) |
const |
|
inline |
DateTime DateTime::AddMinutes |
( |
const double |
minutes | ) |
const |
|
inline |
DateTime DateTime::AddMonths |
( |
const int |
months | ) |
const |
|
inline |
DateTime DateTime::AddSeconds |
( |
const double |
seconds | ) |
const |
|
inline |
DateTime DateTime::AddTicks |
( |
int64_t |
ticks | ) |
const |
|
inline |
DateTime DateTime::AddYears |
( |
const int |
years | ) |
const |
|
inline |
int DateTime::Compare |
( |
const DateTime & |
dt | ) |
const |
|
inline |
int DateTime::Day |
( |
| ) |
const |
|
inline |
int DateTime::DayOfWeek |
( |
| ) |
const |
|
inline |
int DateTime::DayOfYear |
( |
int |
year, |
|
|
int |
month, |
|
|
int |
day |
|
) |
| const |
|
inline |
Find the day of the year given the year/month/day
- Parameters
-
[in] | year | the year |
[in] | month | the month |
[in] | day | the day |
- Returns
- the day of the year
static int DateTime::DaysInMonth |
( |
int |
year, |
|
|
int |
month |
|
) |
| |
|
inlinestatic |
Find the number of days in a month given the year/month
- Parameters
-
[in] | year | the year |
[in] | month | the month |
- Returns
- the days in the given month
bool DateTime::Equals |
( |
const DateTime & |
dt | ) |
const |
|
inline |
void DateTime::FromTicks |
( |
int & |
year, |
|
|
int & |
month, |
|
|
int & |
day |
|
) |
| const |
|
inline |
int DateTime::Hour |
( |
| ) |
const |
|
inline |
Hour component
- Returns
- the hour component
void DateTime::Initialise |
( |
int |
year, |
|
|
int |
month, |
|
|
int |
day, |
|
|
int |
hour, |
|
|
int |
minute, |
|
|
int |
second, |
|
|
int |
microsecond |
|
) |
| |
|
inline |
Constructor
- Parameters
-
[in] | year | the year |
[in] | month | the month |
[in] | day | the day |
[in] | hour | the hour |
[in] | minute | the minute |
[in] | second | the second |
[in] | microsecond | the microsecond |
static bool DateTime::IsLeapYear |
( |
int |
year | ) |
|
|
inlinestatic |
Find whether a year is a leap year
- Parameters
-
[in] | year | the year to check |
- Returns
- whether the year is a leap year
static bool DateTime::IsValidYear |
( |
int |
year | ) |
|
|
inlinestatic |
Checks whether the given year is valid
- Parameters
-
[in] | year | the year to check |
- Returns
- whether the year is valid
static bool DateTime::IsValidYearMonth |
( |
int |
year, |
|
|
int |
month |
|
) |
| |
|
inlinestatic |
Check whether the year/month is valid
- Parameters
-
[in] | year | the year to check |
[in] | month | the month to check |
- Returns
- whether the year/month is valid
static bool DateTime::IsValidYearMonthDay |
( |
int |
year, |
|
|
int |
month, |
|
|
int |
day |
|
) |
| |
|
inlinestatic |
Check whether the year/month/day is valid
- Parameters
-
[in] | year | the year to check |
[in] | month | the month to check |
[in] | day | the day to check |
- Returns
- whether the year/month/day is valid
int DateTime::Microsecond |
( |
| ) |
const |
|
inline |
Microsecond component
- Returns
- the microsecond component
int DateTime::Minute |
( |
| ) |
const |
|
inline |
Minute component
- Returns
- the minute component
int DateTime::Month |
( |
| ) |
const |
|
inline |
static DateTime DateTime::Now |
( |
bool |
useMicroseconds = false | ) |
|
|
inlinestatic |
Return the current time
- Parameters
-
[in] | microseconds | whether to set the microsecond component |
- Returns
- a DateTime object set to the current date and time
int DateTime::Second |
( |
| ) |
const |
|
inline |
Second component
- Returns
- the Second component
int64_t DateTime::Ticks |
( |
| ) |
const |
|
inline |
Get the number of ticks
- Returns
- the number of ticks
double DateTime::ToGreenwichSiderealTime |
( |
| ) |
const |
|
inline |
Convert to greenwich sidereal time
- Returns
- the greenwich sidereal time
double DateTime::ToJ2000 |
( |
| ) |
const |
|
inline |
Return the modified julian date since the j2000 epoch January 1, 2000, at 12:00 TT
- Returns
- the modified julian date
double DateTime::ToJulian |
( |
| ) |
const |
|
inline |
Convert to a julian date
- Returns
- the julian date
double DateTime::ToLocalMeanSiderealTime |
( |
const double |
lon | ) |
const |
|
inline |
Convert to local mean sidereal time (GMST plus the observer's longitude)
- Parameters
-
[in] | lon | observers longitude |
- Returns
- the local mean sidereal time
std::string DateTime::ToString |
( |
| ) |
const |
|
inline |
int DateTime::Year |
( |
| ) |
const |
|
inline |
int64_t DateTime::m_encoded |
|
private |
The documentation for this class was generated from the following file:
- /home/travis/build/TUW-VieVS/VieSchedpp/SGP4/DateTime.h