1 #ifndef GCP_UTIL_DATE_H
2 #define GCP_UTIL_DATE_H
26 Date(std::string date);
27 Date(
int day, std::string month,
int year);
29 Date(
unsigned iYear,
unsigned dayInYear,
unsigned hour,
unsigned min,
unsigned sec);
32 void initialize(
unsigned day, std::string month,
int year);
39 static double calToMjd(
int id,
int im,
int iy);
40 static double calToMjd(
unsigned day, std::string month,
int year);
41 static double calToMjd(
int id,
int im,
int iy,
int hour,
int min,
int sec);
43 static std::string mjdToCal(
double mjd);
44 std::string mjdToCal();
46 static std::string mjdToArcCal(
double mjd);
47 std::string mjdToArcCal();
49 static std::string mjdToHorizonsCal(
double mjd);
50 std::string mjdToHorizonsCal();
52 static void mjdToCalDate(
double mjd,
53 unsigned& year,
unsigned& month,
unsigned& day);
63 void setTo(std::string date);
64 void setTo(std::string date, std::string time);
65 void setTo(
unsigned iYear,
unsigned dayInYear,
unsigned hour,
unsigned min,
unsigned sec);
67 void setToDateAndTime(std::string dateAndTime);
68 void setMjd(
double mjd);
69 void setTo40mWxString(std::string date);
70 void setToCbassWxString(std::string date);
74 void operator=(std::string start);
76 bool operator>(
Date& date);
77 bool operator>=(
Date& date);
78 bool operator<(
Date& date);
79 bool operator<(
const Date& date);
80 bool operator<=(
Date& date);
81 bool operator==(
Date& date);
87 friend std::ostream& operator<<(std::ostream& os,
Date& date);
88 friend std::ostream& operator<<(std::ostream& os,
const Date& date);
92 static char* months[];
95 void addDays(
double days);
96 void addHours(
double hours);
98 unsigned numberOfDays();
102 unsigned dayInYear();
108 static unsigned dayInWeek(
double mjd);
114 static void slaDjcal(
int ndp,
double djm,
int iymdf[4]);
115 static void slaDjcl(
double djm,
int* iy,
int* im,
int*
id,
double* df,
int* status);
116 static void slaClyd(
int iy,
int im,
int id,
int *ny,
int *nd,
int *jstat );
118 static unsigned validateMonth(std::string month);
119 static unsigned validateDay(
unsigned day, std::string month);
120 static int validateYear(
int year);
127 #endif // End #ifndef GCP_UTIL_DATE_H
Date()
Definition: Date.cc:55
Date operator+(double days)
Definition: Date.cc:656
static double calToMjd(int id, int im, int iy)
Definition: Date.cc:206
virtual ~Date()
Definition: Date.cc:88
static int deltaDays(Date &date1, Date &date2)
Definition: Date.cc:665
void operator+=(double days)
Definition: Date.cc:648
Date operator-(double days)
Definition: Date.cc:623