Go to the source code of this file.
Classes | |
class | Time |
struct | ExpandedDateTime |
ExpandedDateTime: Struct with fields for Year, Month, Day, Hour, etc. More... | |
Defines | |
#define | HoursToTime(h) ( ((double)h) / 24.0 ) |
Convert hours h to time (double). | |
Functions | |
double | EdtToTime (ExpandedDateTime *pd) |
Convert ExpandedDateTime struct to date+time represented as a double. | |
void | TimeToEdt (ExpandedDateTime *p, double time) |
Expand date+time represented as a double to ExandedDateTime struct. | |
double | GetCurrentTime () |
Returns a double representing the current date+time. | |
void | PrintTime (double d, int full=0) |
Print time. | |
double | StrToDate (char *s) |
Convert string with date in format YYYYMMDDHHMMSS to date in double. | |
void | TestTime (char *timeStr) |
For test purposes, force current time to timeStr in YYYYMMDDHHMMSS format. | |
Data * | TimeAct (Context *p) |
|
Convert hours h to time (double).
|
|
Convert ExpandedDateTime struct to date+time represented as a double. Convert ExpandedDateTime struct to date+time represented as a double. See TimeToEdt() for explanation of date+time as a double. The value in p->mLeapFlag is ignored. Values are not checked to confirm they are in their appropriate ranges. TODO: This should be a method of EDT. |
|
Returns a double representing the current date+time. Returns a double representing the current date+time. Note: If a value is specified by TestTime() it will overide local current time. |
|
Print time.
|
|
Convert string with date in format YYYYMMDDHHMMSS to date in double.
|
|
For test purposes, force current time to timeStr in YYYYMMDDHHMMSS format. For test purposes, force current time to time specificied by timeStr in YYYYMMDDHHMMSS format. This is accomplished by forcing GetCurrentTime() to return the time specified rather than the current time. |
|
|
|
Expand date+time represented as a double to ExandedDateTime struct. Expand date+time represented as a double to ExpandedDateTime struct. When date+time is represented as a double, the integer portion (which can be negative) represents the number of days since Jan 1, 1900. The fractional part of the double represents the fraction of the 24 hour day that has elapsed. Example: 0.5 == 12:00 noon, 0.25 = 6:00 AM. Note: This conversion takes into account the fairly complicated rule for leap days (leap year if divisible by 4, but not 100, unless also divisible by 400). So 2000 is a leap year, while 1900 and 1800 were not. Limitations:
TODO: This should be a method of EDT. |