An utility class that performs some calendar conversion from and to the julian day. More...
#include <GregorianCalendarConverter.h>
Public Member Functions | |
virtual void | jday2calendar (const eyedblib::int32 julian, eyedblib::int32 *year, eyedblib::int16 *month, eyedblib::int16 *day) |
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) |
Computes the julian day from a calendar date (year, month, day). | |
virtual eyedblib::int16 | jday2day_of_year (const eyedblib::int32 julian) |
This method is not thread-safe. | |
virtual Bool | jday2leap_year (const eyedblib::int32 julian) |
This method is not thread-safe. | |
virtual Weekday::Type | jday2weekday (const eyedblib::int32 julian) |
Computes the week day (monday, tuesday. | |
virtual eyedblib::int32 | ascii2jday (const char *date) |
This method is not thread-safe. | |
virtual char * | jday2ascii (const eyedblib::int32 julian) |
This method is not thread-safe. | |
virtual eyedblib::int32 | current_date () |
Gets the current julian day. |
An utility class that performs some calendar conversion from and to the julian day.
Definition at line 36 of file GregorianCalendarConverter.h.
void eyedb::GregorianCalendarConverter::calendar2jday | ( | eyedblib::int32 * | julian, | |
const eyedblib::int32 | year, | |||
const eyedblib::int16 | month, | |||
const eyedblib::int16 | day | |||
) | [virtual] |
Computes the julian day from a calendar date (year, month, day).
The conversion algorithm comes from Hermetic Systems at http://hermetic.magnet.ch/cal_stud/jdn.htm (Henry F. Fliegel and Thomas C. Van Flandern). This method is not thread-safe.
julian | The returned julian day or -1 if the date is invalid | |
year | The year ( > -4713) | |
month | The month | |
day | The day of month |
Implements eyedb::CalendarConverter.
Definition at line 129 of file GregorianCalendarConverter.cc.
void eyedb::GregorianCalendarConverter::jday2calendar | ( | const eyedblib::int32 | julian, | |
eyedblib::int32 * | year, | |||
eyedblib::int16 * | month, | |||
eyedblib::int16 * | day | |||
) | [virtual] |
Computes the calendar date (year, month, day) from the julian day.
The conversion algorithm comes from Hermetic Systems at http://hermetic.magnet.ch/cal_stud/jdn.htm (Henry F. Fliegel and Thomas C. Van Flandern). This method is not thread-safe.
julian | The julian day (negative values will result in -4713-11-25) | |
year | The returned year ( > -4713) | |
month | The returned month (1-12) | |
day | The returned day of month (1-31) |
Implements eyedb::CalendarConverter.
Definition at line 76 of file GregorianCalendarConverter.cc.
Weekday::Type eyedb::GregorianCalendarConverter::jday2weekday | ( | const eyedblib::int32 | julian | ) | [virtual] |
Computes the week day (monday, tuesday.
..) from the julian day.
julian | The julian day |
Implements eyedb::CalendarConverter.
Definition at line 188 of file GregorianCalendarConverter.cc.