#include <Date.h>
Inheritance diagram for DateZulu:

Public Types | |
| typedef sint32 | julian_t |
| typedef uint08 | day_t |
| typedef uint08 | weekday_t |
| typedef uint08 | month_t |
| typedef sint16 | year_t |
| enum | WEEKDAY { MONDAY = 1, TUESDAY = 2, WEDNESDAY = 3, THURSDAY = 4, FRIDAY = 5, SATURDAY = 6, SUNDAY = 7 } |
| enum | MONTH { JANUARY = 1, FEBRUARY = 2, MARCH = 3, APRIL = 4, MAY = 5, JUNE = 6, JULY = 7, AUGUST = 8, SEPTEMBER = 9, OCTOBER = 10, NOVEMBER = 11, DECEMBER = 12 } |
| typedef double | time_t |
Public Methods | |
| DateZulu () | |
| Default constructor. | |
| DateZulu (year_t year, month_t month, day_t day, int hour, int minute, time_t second) | |
| Construct a new DateZulu. | |
| DateZulu (julian_t julian, int hour, int minute, time_t second) | |
| Construct a new DateZulu. | |
| DateZulu (const DateZulu &dz) | |
| Copy constructor. | |
| const DateZulu & | operator= (const DateZulu &dz) |
| Assignment operator from another DateZulu. | |
| void | convert (struct tm *tm, bool local=false) const |
| Store the time into a standard time structure. | |
| std::string | formatString (const char *format, bool local=false) const |
| Format the date and time to a string. | |
| virtual std::string | asString () const |
| Return a string representation of the date and time. | |
| virtual std::string | typeString () const |
| Return a string representation of the type. | |
| int | addTime (time_t dt) |
| Increment the current time, with date rollover. | |
| int | setTime (time_t t) |
| Set the current time, with date rollover. | |
| double | getJulianDate () const |
| Get the real-valued Julian date. | |
| double | getAccurateMST (radian_t longitude=0.0L) const |
| Get the (accurate) Mean Sidereal time. | |
| double | getMST (radian_t longitude=0.0L) const |
| Get the Mean Sidereal time. | |
| bool | isLeap () const |
| Returns true if this is a leap year. | |
| weekday_t | getWeekday () const |
| Get the day of the week as an integer (1=MONDAY..7=SUNDAY). | |
| month_t | getMonth () const |
| Get the month of the year as an integer (1..12). | |
| month_t | getDay () const |
| Get the day of the month (1..). | |
| year_t | getYear () const |
| Get the year. | |
| julian_t | getJulian () const |
| Get the Julian day (as an integer). | |
| const char * | getMonthName () const |
| Get the full month name (e.g. | |
| const char * | getMonthShortName () const |
| Get the abbreviated month name (e.g. | |
| const char * | getWeekdayName () const |
| Get the full day of the week name (e.g. | |
| const char * | getWeekdayShortName () const |
| Get the abbreviated day of the week name (e.g. | |
| void | setJulian (julian_t j) |
| Set the Julian day. | |
| int | getDayOfYear () const |
| Get the day of the year (1..). | |
| int | getMondayWeekOfYear () const |
| Get the week of the year for weeks starting on Monday. | |
| int | getSundayWeekOfYear () const |
| Get the week of the year for weeks starting on Sunday. | |
| bool | isFirstOfMonth () const |
| Returns true if it is the first day of the month (i.e. | |
| bool | isLastOfMonth () const |
| Returns true if it is the last day of the month. | |
| void | addDays (int ndays) |
| Add a number of days to the date. | |
| void | subtractDays (int ndays) |
| Subtract a number of days from the date. | |
| void | addMonths (int nmonths) |
| Add a number of months to the date. | |
| void | subtractMonths (int nmonths) |
| Subtract a number of months to the date. | |
| void | addYears (int nyears) |
| Add a number of years to the date. | |
| void | subtractYears (int nyears) |
| Subtract a number of years to the date. | |
| virtual int | compare (const Date &other) const |
| Compare with another Date. | |
| void | convert (struct tm *tm) const |
| Convert the date to a struct tm (time fields are set to zero). | |
| std::string | formatString (const char *format) const |
| Convert the date to a string using strftime formatting. | |
| void | setTZ (int tz) |
| Set the timezone (only effects the local time). | |
| int | getTZ () const |
| Get the timezone. | |
| int | reduce () |
| Wrap time to 24 hour period. | |
| time_t | getTime (bool local=false) const |
| Get the curret time in seconds since midnight. | |
| bool | overflow () const |
| Test if the time accumulator exceeds 24 hours. | |
| int | getHour (bool local=false) const |
| Get the hour. | |
| int | getMinute () const |
| Get the minute. | |
| int | getSecond () const |
| Get the second. | |
| int | rollover () |
| Adjust the time to fit into the range 0-86400. | |
| int | setTime (time_t t, bool local=false) |
| Set the time. | |
Static Public Methods | |
| bool | validYMD (year_t year, month_t month, day_t day) |
| Check if a given (year, month, day) exists. | |
| bool | isLeap (year_t year) |
| Returns true if the year is a leap year. | |
| int | getDaysInMonth (month_t month, year_t year) |
| Get the number of days in a month. | |
| int | getWeeksInYear (year_t year) |
| Get the number of weeks in a year (for weeks starting on Monday). | |
| int | getSundayWeeksInYear (year_t year) |
| Get the number of weeks in a year (for weeks starting on Sunday). | |
| int | compare (const Date &a, const Date &b) |
| Compare two dates. | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Default constructor.
|
|
||||||||||||||||||||||||||||
|
Construct a new DateZulu.
|
|
||||||||||||||||||||
|
Construct a new DateZulu.
|
|
|
Copy constructor.
|
|
|
Add a number of days to the date.
|
|
|
Add a number of months to the date. The day will be truncated to fit within the new month. |
|
|
Increment the current time, with date rollover.
Reimplemented from Zulu. Reimplemented in SimDate. |
|
|
Add a number of years to the date. February 29 change to February 28 for non-leap years. |
|
|
Return a string representation of the date and time.
Reimplemented from Date. Reimplemented in SimDate. |
|
|
Compare with another Date.
|
|
||||||||||||
|
Compare two dates.
|
|
|
Convert the date to a struct tm (time fields are set to zero).
|
|
||||||||||||
|
Store the time into a standard time structure.
Reimplemented from Zulu. |
|
|
Convert the date to a string using strftime formatting.
|
|
||||||||||||
|
Format the date and time to a string.
Reimplemented from Zulu. |
|
|
Get the (accurate) Mean Sidereal time.
|
|
|
Get the day of the month (1..).
|
|
|
Get the day of the year (1..).
|
|
||||||||||||
|
Get the number of days in a month.
|
|
|
Get the hour.
|
|
|
Get the Julian day (as an integer).
|
|
|
Get the real-valued Julian date.
|
|
|
Get the minute.
|
|
|
Get the week of the year for weeks starting on Monday.
|
|
|
Get the month of the year as an integer (1..12).
|
|
|
Get the full month name (e.g. "January"). |
|
|
Get the abbreviated month name (e.g. "Jan"). |
|
|
Get the Mean Sidereal time.
|
|
|
Get the second.
|
|
|
Get the week of the year for weeks starting on Sunday.
|
|
|
Get the number of weeks in a year (for weeks starting on Sunday).
|
|
|
Get the curret time in seconds since midnight.
|
|
|
Get the timezone.
|
|
|
Get the day of the week as an integer (1=MONDAY..7=SUNDAY).
|
|
|
Get the full day of the week name (e.g. "Monday"). |
|
|
Get the abbreviated day of the week name (e.g. "Mon"). |
|
|
Get the number of weeks in a year (for weeks starting on Monday).
|
|
|
Get the year.
|
|
|
Returns true if it is the first day of the month (i.e. day == 1). |
|
|
Returns true if it is the last day of the month.
|
|
|
Returns true if the year is a leap year.
|
|
|
Returns true if this is a leap year.
|
|
|
Assignment operator from another DateZulu.
|
|
|
Test if the time accumulator exceeds 24 hours.
|
|
|
Wrap time to 24 hour period. Reduces the seconds since midnight to the range 0-86400.
|
|
|
Adjust the time to fit into the range 0-86400.
|
|
|
Set the Julian day.
|
|
||||||||||||
|
Set the time.
|
|
|
Set the current time, with date rollover.
Reimplemented in SimDate. |
|
|
Set the timezone (only effects the local time).
|
|
|
Subtract a number of days from the date.
|
|
|
Subtract a number of months to the date. The day will be truncated to fit within the new month. |
|
|
Subtract a number of years to the date. February 29 change to February 28 for non-leap years. |
|
|
Return a string representation of the type.
Reimplemented from Date. Reimplemented in SimDate. |
|
||||||||||||||||
|
Check if a given (year, month, day) exists.
|
|
SimData version pre-0.4.0. For more information on SimData, visit the SimData Homepage. Generated on Tue Oct 14 12:06:40 2003, using Doxygen 1.2.18. |