#include <CDataStructures.h>
Inheritance diagram for CDate::
Public Methods | |
CDate (void) | |
~CDate (void) | |
bool | setDate (int day, int month, int year) |
Sets the date. More... | |
bool | setStartTime (int hour, int minute, bool pm) |
Sets the starting time of the event in 12 hour format. More... | |
bool | setEndTime (int hour, int minute, bool pm) |
Sets the ending time of the event in 12 hour format. More... | |
void | setComment (string comment) |
int | getDay (void) |
int | getMonth (void) |
int | getYear (void) |
int | getStartHour (void) |
int | getStartMinute (void) |
bool | isStartPM (void) |
int | getEndHour (void) |
int | getEndMinute (void) |
bool | isEndPM (void) |
void | setAllDay (void) |
Set and unset whether an event is all day or has specific times. More... | |
void | unSetAllDay (void) |
bool | isAllDay (void) |
string | getComment (void) |
string | getListing (int numberofchars) |
string | getDate (bool slashformat=true) |
Returns a nicely formatted string for the date. More... | |
string | getTime (bool endtime=false) |
Returns a nicely formatted time for either start or end. More... | |
string | getNameOfDay (void) |
Returns the name of the day of the date. More... | |
string | getNameOfMonth (bool abbreviated=true) |
Returns the name of the month of the date, abbr or full. More... | |
string | getNumberOfDay (void) |
Returns a string of the day of the month with appending letters. More... | |
string | getYearAsString (void) |
Returns the year as a string. More... | |
void | inputData (string inputdata) |
string | outputData (void) |
Provides starting and ending times, month, day, year, and flag for specifying an all day event, as well as a string decription of event. Provides proper error checking, not allowing invalid times or dates. Provides pretty printing string routines for the day names, months, years, times, via individual functions, or provides all them combined in nicely formatted string. Also provides initialization and saving routines saving and reading to memory and up/downloading to PC for backup, etc.
|
|
|
|
|
|
|
Returns a nicely formatted string for the date. The default is the slash format. For example slashformat returns "11/26/2001" Else returns "Monday, November 26th 2001" |
|
|
|
|
|
|
|
|
|
|
|
Returns the name of the day of the date.
|
|
Returns the name of the month of the date, abbr or full.
|
|
Returns a string of the day of the month with appending letters. Proper appendings "st", "nd", "rd", or "th". For example if the date is 14 of June it will return "14th" |
|
|
|
|
|
Returns a nicely formatted time for either start or end. Returns "5:57 AM" for example. Returns "" if all day event |
|
|
|
Returns the year as a string.
|
|
|
|
|
|
|
|
|
|
|
|
Set and unset whether an event is all day or has specific times. If an event is all day, start and end times cannot be set and the all day events will be listed before the timed events that day in the CCalendar. If all day event, getTime() returns "". |
|
|
|
Sets the date. Default sets to 1/1/2001 Must be within 2001 to 2299 Returns true on valid date else returns false and sets to default |
|
Sets the ending time of the event in 12 hour format. Default is set to start time. Returns true if a valid time and after start time. Else returns false and keeps default endtime. |
|
Sets the starting time of the event in 12 hour format. Returns true if a valid time. Returns false otherwise and sets to default of midnight |
|
|