Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

CDate Class Reference

Basic node for storing a calendar event. More...

#include <CDataStructures.h>

Inheritance diagram for CDate::

CListItem List of all members.

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)

Detailed Description

Basic node for storing a calendar event.

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.


Constructor & Destructor Documentation

CDate::CDate void   
 

CDate::~CDate void   
 


Member Function Documentation

string CDate::getComment void   
 

string CDate::getDate bool    slashformat = true
 

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"

int CDate::getDay void   
 

int CDate::getEndHour void   
 

int CDate::getEndMinute void   
 

string CDate::getListing int    numberofchars
 

int CDate::getMonth void   
 

string CDate::getNameOfDay void   
 

Returns the name of the day of the date.

string CDate::getNameOfMonth bool    abbreviated = true
 

Returns the name of the month of the date, abbr or full.

string CDate::getNumberOfDay void   
 

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"

int CDate::getStartHour void   
 

int CDate::getStartMinute void   
 

string CDate::getTime bool    endtime = false
 

Returns a nicely formatted time for either start or end.

Returns "5:57 AM" for example. Returns "" if all day event

int CDate::getYear void   
 

string CDate::getYearAsString void   
 

Returns the year as a string.

void CDate::inputData string    inputdata
 

bool CDate::isAllDay void   
 

bool CDate::isEndPM void   
 

bool CDate::isStartPM void   
 

string CDate::outputData void   
 

void CDate::setAllDay void   
 

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 "".

void CDate::setComment string    comment
 

bool CDate::setDate int    day,
int    month,
int    year
 

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

bool CDate::setEndTime int    hour,
int    minute,
bool    pm
 

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.

bool CDate::setStartTime int    hour,
int    minute,
bool    pm
 

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

void CDate::unSetAllDay void   
 


The documentation for this class was generated from the following files:
Generated on Thu Dec 6 00:14:52 2001 for Dijinni by doxygen1.2.12 written by Dimitri van Heesch, © 1997-2001