Inheritance diagram for CP_Date:
Public Member Functions | |
void | SetID (FourCharCode inIdentifier) |
FourCharCode | GetID () |
void | RegisterSignal (const CP_SignalHolder &inSignal) |
CP_DataValueSignal * | FindSignal (const CP_String &inSignalName) |
UInt32 | GetNumberSignals () |
CP_String | GetNthSignalName (UInt32 inSignalIndex) |
void | RegisterSlot (const CP_SlotHolder &inSlot) |
CP_DataValueSlot | FindSlot (const CP_String &inSlotName) |
UInt32 | GetNumberSlots () |
CP_String | GetNthSlotName (UInt32 inSlotIndex) |
template<class R, class P1, class P2> | |
CP_CommandHandlerSignal * | Connect (CPLAT::CP_CommandNo cmd, void(R::*handler)(P1, P2), SInt32 mode) |
template<class R, class P1, class P2> | |
void | Connect (CP_Object *control, const CPLAT::CP_String &signalName, void(R::*handler)(P1, P2)) |
Constructor / Destructor | |
CP_Date () | |
Constructor. | |
CP_Date (const CP_Date &inDate) | |
CP_Date (UInt32 inJulianDate) | |
CP_Date (const CP_String &inDateString, CP_E_DateFormat inDateFormat=CP_E_FullDateFormat, CP_E_DateFormatInput inDateFormatIn=CP_E_MMDDYYYY_DateFormat) | |
~CP_Date () | |
Destructor. | |
Getters | |
UInt32 | GetJulian () |
SInt16 | GetYear () |
SInt16 | GetMonth () |
SInt16 | GetDay () |
SInt16 | GetDayOfWeek () |
CP_String | GetMonthString (bool inShortVersion=false) |
Math | |
CP_Date | operator+ (const SInt32 inDays) |
CP_Date | operator- (const SInt32 inDays) |
UInt32 | operator- (CP_Date &inDate) |
CP_Date & | operator+= (const SInt32 inDays) |
CP_Date & | operator-= (const SInt32 inDays) |
CP_Date & | operator++ () |
CP_Date & | operator-- () |
const CP_Date & | operator= (const CP_Date &inDate) |
const CP_Date & | operator= (const CP_String &inDateString) |
bool | operator> (const CP_Date &inDate) |
bool | operator> (const CP_String &inDateString) |
bool | operator< (const CP_Date &inDate) |
bool | operator< (const CP_String &inDateString) |
bool | operator>= (const CP_Date &inDate) |
bool | operator>= (const CP_String &inDateString) |
bool | operator<= (const CP_Date &inDate) |
bool | operator<= (const CP_String &inDateString) |
bool | operator== (const CP_Date &inDate) |
bool | operator== (const CP_String &inDateString) |
bool | operator!= (const CP_Date &inDate) |
bool | operator!= (const CP_String &inDateString) |
const CP_Date & | AddMonths (SInt16 inMonths) |
const CP_Date & | SubtractMonths (SInt16 inMonths) |
const CP_Date & | AddYears (SInt16 inYears) |
const CP_Date & | SubtractYears (SInt16 inYears) |
const CP_Date & | AddDays (SInt16 inDays) |
const CP_Date & | SubtractDays (SInt16 inDays) |
SInt16 | YearsOld () |
SInt16 | ElapsedDays (CP_Date &inStartDate) |
Format | |
CP_String | Format (SInt16 inFormat=CP_DefaultDateFormat) const |
Setters | |
void | SetToSystemDate () |
void | SetYear (SInt16 inYear) |
void | SetMonth (SInt16 inMonth) |
void | SetDay (SInt16 inDay) |
void | SetDayOfWeek (SInt16 inDayOfWeek) |
Testers | |
bool | IsValid () |
parsing | |
bool | ParseDateString (const CP_String &inDate, SInt16 &inMonth, SInt16 &inDay, SInt16 &inYear) |
Constructor / Destructor | |
CP_Date (UInt32 inMacSeconds, bool inMacOSTime) | |
Constructor. | |
CP_Date (LongDateRec inDateRec) | |
Getters | |
void | GetDate (LongDateRec &inDateRec) |
Setters | |
void | SetDate (LongDateRec inDateRec) |
Constructor / Destructor | |
CP_Date (SYSTEMTIME inSystemTime) | |
Constructor. | |
Getters | |
void | GetDate (SYSTEMTIME &inSystemTime) |
Setters | |
void | SetDate (SYSTEMTIME inSystemTime) |
Static Public Member Functions | |
static void | Connect (CP_Object *sender, const CP_String &signalName, CP_Object *receiver, const CP_String &slotName, const bool reciprocal=false) |
static void | Connect (CP_Object *sender, CP_Object *receiver, const bool reciprocal=false, const CP_String &signalName=kCP_Signal_ValueChanged, const CP_String &slotName=kCP_Slot_SetValue) |
Protected Attributes | |
SInt16 | fYear |
SInt16 | fMonth |
SInt16 | fDay |
SInt16 | fDayOfWeek |
UInt32 | fJulian |
CP_E_DateFormat | fCurrentDateFormat |
CP_E_DateFormatInput | fInputDateFormat |
CP_Signals_Array * | fSignals |
CP_Slots_Array * | fSlots |
FourCharCode | fObjectID |
Static Protected Attributes | |
static FourCharCode | fObjectIDCount = 0 |
Private Member Functions | |
Utility | |
void | MDYToJulian () |
void | JulianToWday () |
void | JulianToMDY () |
void | AdjustDays () |
bool | ParseDateString (const CP_String &inDate) |
There are also methods to return the date in a specific formatted way.
|
Constructor. Sets the date to todays date.
|
|
Copy constructor.
|
|
Constructor.
|
|
Constructor.
|
|
Destructor.
|
|
Formatting style for input of dates. |
|
Constructor. Constructs the date from the passed in MacOS LongDateRec.
|
|
Constructor. Constructs the date from the passed in Windows SYSTEMTIME.
|
|
Returns the date in Julian format.
|
|
Returns the year of the date.
|
|
Returns the month of the date.
|
|
Returns the date of the date.
|
|
Returns the date of the week this date falls on.
|
|
Returns the month of the date in either a long or short version.
|
|
Adds the passed in number of days to this date, and returns a new CP_Date object containing the new date.
|
|
Subtracts the passed in number of days to this date, and returns a new CP_Date object containing the new date.
|
|
Subtract the passed in date from this one, and return the result as a Julian formatted date.
|
|
Adds the passed in number of days to this date.
|
|
Subtracts the passed in number of days from this date.
|
|
Increments the date by one day.
|
|
Decrements the date by one day.
|
|
Assignment operator. Copies the information from the passed in date
|
|
Assignment operator. This version takes a CP_String containing a formatted date and will attempt to convert to the proper date format.
|
|
Greater than operator. Returns true if the passed in date represents a date this is greater than this date.
|
|
Greater than operator. Returns true if the passed in date string represents a date this is greater than this date. The passed in string is first converted to a CP_Date object before comparison. The format of the string must be properly formatted. See operator = for some examples.
|
|
Less than operator. Returns true if the passed in date represents a date this is less than this date.
|
|
Less than operator. Returns true if the passed in date string represents a date this is less than this date. The passed in string is first converted to a CP_Date object before comparison. The format of the string must be properly formatted. See operator = for some examples.
|
|
Greater than or equal to operator. Returns true if the passed in date represents a date this is greater than or equal to this date.
|
|
Greater than or equal to operator. Returns true if the passed in date string represents a date this is greater than or equal to this date. The passed in string is first converted to a CP_Date object before comparison. The format of the string must be properly formatted. See operator = for some examples.
|
|
Less than or equal to operator. Returns true if the passed in date represents a date this is less than or equal to this date.
|
|
Less than or equal to operator. Returns true if the passed in date string represents a date this is less than or equal to this date. The passed in string is first converted to a CP_Date object before comparison. The format of the string must be properly formatted. See operator = for some examples.
|
|
Equality operator. Returns true if the passed in date represents a date this is equal to this date.
|
|
Equality operator. Returns true if the passed in date string represents a date this is equal to this date. The passed in string is first converted to a CP_Date object before comparison. The format of the string must be properly formatted. See operator = for some examples.
|
|
Inequality operator. Returns true if the passed in date represents a date this is not equal to this date.
|
|
Inequality operator. Returns true if the passed in date string represents a date this is not equal to this date. The passed in string is first converted to a CP_Date object before comparison. The format of the string must be properly formatted. See operator = for some examples.
|
|
Adds the passed in number of months to this date, and returns a reference to this date.
|
|
Subtracts the passed in number of months from this date, and returns a reference to this date.
|
|
Adds the passed in number of years to this date, and returns a reference to this date.
|
|
Subtracts the passed in number of years from this date, and returns a reference to this date.
|
|
Adds the passed in number of days to this date, and returns a reference to this date.
|
|
Subtracts the passed in number of days to this date, and returns a reference to this date.
|
|
Returns the age, based on todays date of this date.
|
|
Returns the number of elapsed days from the passed in start date to the date stored in this object.
|
|
Returns a string containing the formmated output of this date. The passed in format can be one of the following:
|
|
Sets the date represented by this object to that of the platforms.
|
|
Sets the year of this date.
|
|
Sets the month of this date.
|
|
Sets the date of this date.
|
|
Sets the date of the week of this date.
|
|
Tests to see if this date is valid.
|
|
Parses the passed in string into the month, day and year. The results are returned in the passed in data members.
|
|
Converts the date from MDY format to Julian format. Used internally to convert from the two formats.
|
|
Calculats the day of week from the Julian data member.
|
|
Converts Julian data member to the corresponding month, day, year and sets the internal data members to these new values.
|
|
Internal routine to adjust the day fields based on the date.
|
|
Parses the passed in string into the various fields that this date needs.
|
|
Returns the date in the passed in MacOS LongDateRec.
|
|
Sets the date from the passed in MacOS LongDateRec.
|
|
Returns the date in the passed in Windows SYSTEMTIME, formatted as a Windows SYSTEMTIME.
|
|
Sets the date from the passed in Windows SYSTEMTIME.
|
|
Sets the identifier for this object. If a specific identifier is not set with this function, then a default id is used, which is simply a running count of the number of objects created.
|
|
Returns the objects identifier.
|
|
Registers the signal / signal name contained in the passed in inSignal object.
|
|
Finds the CP_DataValueSignal object that matches the passed in inSignalName.
|
|
Returns the number of signals for this object.
|
|
Returns the signal name of the passed in signal index.
|
|
Registers the slot / slot name contained in the passed in inSlot object.
|
|
Finds the CP_Slot1 object that matches the passed in inSlotName.
|
|
Returns the number of slots for this object.
|
|
Returns the slot name of the passed in signal index.
|
|
|
|
|
|
|
|
|
|
|
|
Year of the date. |
|
Month of the date. |
|
Day of the date. |
|
Day of week. 1 = Sunday, 2 = Monday, etc... 7 = Saturday |
|
Julian representation of the date. |
|
Formatting style for output. |
|
|
|
List of registered signals for this object. |
|
List of registered slots for this object. |
|
Object identifier. |