eyedb::CalendarConverter Class Reference

An utility class that performs some calendar conversion from and to the julian day. More...

#include <CalendarConverter.h>

Inheritance diagram for eyedb::CalendarConverter:

eyedb::GregorianCalendarConverter

List of all members.

Public Member Functions

virtual void jday2calendar (const eyedblib::int32 julian, eyedblib::int32 *year, eyedblib::int16 *month, eyedblib::int16 *day)=0
 Computes the calendar date (year, month, day) from the julian day.
virtual void calendar2jday (eyedblib::int32 *julian, const eyedblib::int32 year, const eyedblib::int16 month, const eyedblib::int16 day)=0
 Computes the julian day from a calendar date (year, month, day).
virtual eyedblib::int16 jday2day_of_year (const eyedblib::int32 julian)=0
 Computes the day of year from the julian day.
virtual Bool jday2leap_year (const eyedblib::int32 julian)=0
 Check if a year is a leap year from the julian day.
virtual Weekday::Type jday2weekday (const eyedblib::int32 julian)=0
 Computes the week day (monday, tuesday.
virtual eyedblib::int32 ascii2jday (const char *date)=0
 Computes the julian day from an ASCII date.
virtual char * jday2ascii (const eyedblib::int32 julian)=0
 Computes an ASCII date from the julian day.
virtual eyedblib::int32 current_date ()=0
 Gets the current julian day.


Detailed Description

An utility class that performs some calendar conversion from and to the julian day.

This is an abstract class.

Definition at line 39 of file CalendarConverter.h.


Member Function Documentation

virtual void eyedb::CalendarConverter::jday2calendar ( const eyedblib::int32  julian,
eyedblib::int32 year,
eyedblib::int16 month,
eyedblib::int16 day 
) [pure virtual]

Computes the calendar date (year, month, day) from the julian day.

Parameters:
julian The julian day
year The returned year
month The returned month
day The returned day of month

Implemented in eyedb::GregorianCalendarConverter.

virtual void eyedb::CalendarConverter::calendar2jday ( eyedblib::int32 julian,
const eyedblib::int32  year,
const eyedblib::int16  month,
const eyedblib::int16  day 
) [pure virtual]

Computes the julian day from a calendar date (year, month, day).

Parameters:
julian The returned julian day or 0 if the date is invalid.
year The year
month The month
day The day of month

Implemented in eyedb::GregorianCalendarConverter.

virtual eyedblib::int16 eyedb::CalendarConverter::jday2day_of_year ( const eyedblib::int32  julian  )  [pure virtual]

Computes the day of year from the julian day.

Parameters:
julian The julian day
Returns:
The day of year

Implemented in eyedb::GregorianCalendarConverter.

virtual Bool eyedb::CalendarConverter::jday2leap_year ( const eyedblib::int32  julian  )  [pure virtual]

Check if a year is a leap year from the julian day.

Parameters:
julian The julian day
Returns:
True if is a leap year, idbfalse otherwise

Implemented in eyedb::GregorianCalendarConverter.

virtual Weekday::Type eyedb::CalendarConverter::jday2weekday ( const eyedblib::int32  julian  )  [pure virtual]

Computes the week day (monday, tuesday.

..) from the julian day.

Parameters:
julian The julian day
Returns:
The week day

Implemented in eyedb::GregorianCalendarConverter.

virtual eyedblib::int32 eyedb::CalendarConverter::ascii2jday ( const char *  date  )  [pure virtual]

Computes the julian day from an ASCII date.

Parameters:
date The ASCII date in ISO format "YYYY-MM-DD"
Returns:
The julian day or 0 if date was not valid.

Implemented in eyedb::GregorianCalendarConverter.

virtual char* eyedb::CalendarConverter::jday2ascii ( const eyedblib::int32  julian  )  [pure virtual]

Computes an ASCII date from the julian day.

Parameters:
julian The julian day
Returns:
The ASCII date in ISO format "YYY-MM-DD". It must be deallocated (delete) by the client.

Implemented in eyedb::GregorianCalendarConverter.


The documentation for this class was generated from the following file:
Generated on Mon Dec 22 18:16:23 2008 for eyedb by  doxygen 1.5.3