A date with no time. Most operations involve a single long value, so performance is generally good. More...
#include <Date.h>
Public Types | |
| enum | DayOfWeek { SUNDAY = 0, MONDAY = 1, TUESDAY = 2, WEDNESDAY = 3, THURSDAY = 4, FRIDAY = 5, SATURDAY = 6 } |
Public Member Functions | |
| Date (const Date &dt) | |
| Date (int year, int mo, int day) | |
| Date (time_t tt) | |
| bool | IsLeapYear () |
| int | Year () const |
| int | Month () const |
| int | Day () const |
| enum DayOfWeek | DayOfWeek () const |
| int | DayOfYear () |
| int | DiffInDays (const Date *dt) const |
| int | DiffInDays (const Date &dt) const |
| void | AddDays (const int days) |
| void | AddMonths (int months) |
| void | AddYears (int years) |
| bool | IsHoliday () const |
| void | ToString (char *buf, const int buflen) const |
| StringPtr | ToString () const |
| bool | Equals (const Date *dt) const |
| bool | Equals (const Date &dt) const |
| Date & | operator= (const Date &dt) |
| bool | operator== (const Date &dt) const |
| bool | operator!= (const Date &dt) const |
| bool | operator> (const Date &dt) const |
| bool | operator< (const Date &dt) const |
| bool | operator>= (const Date &dt) const |
| bool | operator<= (const Date &dt) const |
| time_t | ToSysTime () |
| int | ToRevInt () const |
| virtual int32 | HashCode () const |
| virtual bool | Equals (const IComparable *a) const |
| virtual int | Compare (const IComparable *a) const |
| virtual bool | Equals (const IComparable &a) const |
| virtual int | Compare (const IComparable &a) const |
| virtual int32 | MajicNumber () const |
| Class instances with the same majic number are of the same type (can be casted). Majic numbers above 0xFFFF are available for user applications. | |
| virtual void | ValidateMem () const |
| virtual void | CheckMem () const |
Static Public Member Functions | |
| static Date | Parse (const String &str) |
| static bool | IsDate (const String &str) |
| static Date | Now () |
| static bool | IsLeapYear (int year) |
Protected Attributes | |
| long | m_lJulianDay |
| int | m_y |
| int | m_m |
| int | m_d |
A date with no time. Most operations involve a single long value, so performance is generally good.
Definition at line 53 of file Date.h.