Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members | Related Pages | Examples

P::Date Class Reference
[Core library]

Date class. More...

#include <ptime.h>

Inheritance diagram for P::Date:

P::DateTime List of all members.

Public Types

enum  weekDay_t {
  Saturday = 0, Sunday, Monday, Tuesday,
  Wednesday, Thursday, Firday
}
 Enumeration of weekdays. More...

enum  month_t {
  January = 1, February, March, April,
  May, June, July, August,
  September, October, November, December
}
 Enumeration of months. More...


Public Member Functions

 Date (unsigned short year=1970, unsigned char month=1, unsigned char day=1) throw (InvalidDate)
 ~Date () throw ()
double julianDayNumber () const throw ()
void setYear (unsigned short year)
unsigned short year () const throw ()
void setMonth (unsigned char month) throw (InvalidDate)
unsigned char month () const throw ()
unsigned char daysInMonth () throw ()
 Returns the number of days in stored month.

void setDay (unsigned char day) throw (InvalidDate)
unsigned char day () const throw ()
unsigned short dayOfYear () const throw ()
unsigned char dayOfWeek () const throw ()
bool isInLeapYear () const throw ()
 Test if date is in a leap year.

Dateoperator+= (const TimeSpan &sp)
Dateoperator-= (const TimeSpan &sp)
bool operator> (const Date &d) const throw ()
bool operator< (const Date &d) const throw ()
bool operator>= (const Date &d) const throw ()
bool operator<= (const Date &d) const throw ()
bool operator== (const Date &d) const throw ()
bool operator!= (const Date &d) const throw ()

Static Public Member Functions

unsigned char daysInMonth (unsigned char month, unsigned short year) throw (InvalidDate)
 Returns the number of days in month.

bool isLeapYear (unsigned short year) throw ()
 Test if the given year is a leap year.


Friends

PCORE_EXPORT friend std::ostream & operator<< (std::ostream &os, const Date &d)

Detailed Description

Date class.

Definition at line 98 of file ptime.h.


Member Enumeration Documentation

enum P::Date::month_t
 

Enumeration of months.

Enumeration values:
January 
February 
March 
April 
May 
June 
July 
August 
September 
October 
November 
December 

Definition at line 112 of file ptime.h.

enum P::Date::weekDay_t
 

Enumeration of weekdays.

Enumeration values:
Saturday 
Sunday 
Monday 
Tuesday 
Wednesday 
Thursday 
Firday 

Definition at line 101 of file ptime.h.


Constructor & Destructor Documentation

P::Date::Date unsigned short  year = 1970,
unsigned char  month = 1,
unsigned char  day = 1
throw (InvalidDate)
 

P::Date::~Date  )  throw ()
 


Member Function Documentation

unsigned char P::Date::day  )  const throw ()
 

unsigned char P::Date::dayOfWeek  )  const throw ()
 

unsigned short P::Date::dayOfYear  )  const throw ()
 

unsigned char P::Date::daysInMonth unsigned char  month,
unsigned short  year
throw (InvalidDate) [static]
 

Returns the number of days in month.

unsigned char P::Date::daysInMonth  )  throw ()
 

Returns the number of days in stored month.

bool P::Date::isInLeapYear  )  const throw ()
 

Test if date is in a leap year.

bool P::Date::isLeapYear unsigned short  year  )  throw () [static]
 

Test if the given year is a leap year.

double P::Date::julianDayNumber  )  const throw ()
 

unsigned char P::Date::month  )  const throw ()
 

bool P::Date::operator!= const Date d  )  const throw ()
 

Date& P::Date::operator+= const TimeSpan sp  ) 
 

Reimplemented in P::DateTime.

Date& P::Date::operator-= const TimeSpan sp  ) 
 

Reimplemented in P::DateTime.

bool P::Date::operator< const Date d  )  const throw ()
 

bool P::Date::operator<= const Date d  )  const throw ()
 

bool P::Date::operator== const Date d  )  const throw ()
 

bool P::Date::operator> const Date d  )  const throw ()
 

bool P::Date::operator>= const Date d  )  const throw ()
 

void P::Date::setDay unsigned char  day  )  throw (InvalidDate)
 

void P::Date::setMonth unsigned char  month  )  throw (InvalidDate)
 

void P::Date::setYear unsigned short  year  ) 
 

unsigned short P::Date::year  )  const throw ()
 


Friends And Related Function Documentation

PCORE_EXPORT friend std::ostream& operator<< std::ostream &  os,
const Date d
[friend]
 


The documentation for this class was generated from the following file:
Generated on Fri Mar 12 21:08:33 2004 for P::Classes by doxygen 1.3.3