Inheritance diagram for sword::CalendarGregorian:

Public Methods | |
| virtual bool | isValid (word day, word month, word year, word hour, word minute, word second, word millisecond) const |
| Validates a 'dmy h:m:s' date value within this Calendar. | |
| virtual bool | isLeapYear (word year) const |
| Checks whether a year is a leap year or not. | |
| virtual int64 | daysInMonth (word month, word year) const |
| Computes the number of days in a month. | |
| virtual int64 | daysInYear (word year) const |
| Computes the number of days in a year. | |
| virtual int64 | daysWithinYear (word day, word month, word year) const |
| Computes the number of this day within its year (Jan 1st returns 0). | |
| virtual int64 | daysBeforeYear (word year) const |
| Number of days from 1/1/1601 to 1/1/year. | |
| virtual word | weekDay (Time time) const |
| Computes the day of the week (0=Sunday to 6=Saturday). | |
| virtual Time | easter (word year) const |
| Computes the easter date for a given year. | |
| virtual int64 | dmy2days_ (word day, word month, word year) const |
| Number of days to day/month/year. | |
| virtual void | days2dmy_ (int64 days, word &day, word &month, word &year) const |
| Computes the day/month/year from the number of days. | |
| virtual void | convert (Time time, word &day, word &month, word &year, word &hour, word &minute, word &second, word &millisecond) const |
| Converts a timestamp into a full 'dmy h:m:s' date value. | |
| virtual void | convert (Time time, word &day, word &month, word &year) const |
| Converts a timestamp into a 'dmy' date value. | |
| virtual Time | convert (word day, word month, word year, word hour, word minute, word second, word millisecond) const |
| Converts a full 'dmy h:m:s' date value into a timestamp. | |
| virtual Time | convert (word day, word month, word year) const |
| Converts a 'dmy' date value into a timestamp (assuming hour is 0:0:0). | |
The Gregorian calendar is the usual Time / Date referential for western cultures. It is used since 1582 and specifies correctly the leap years in order to compensate the earth revolution time around the sun (a year is a leap year if it is multiple of 4, but not multiple of 100 except if it is also a multiple of 400).
This implementation is inspired from the free software source code there: http://waysysweb.com/COM/Waysys/util/WayDate.txt
|
||||||||||||||||
|
Converts a 'dmy' date value into a timestamp (assuming hour is 0:0:0).
Implements sword::Calendar. |
|
||||||||||||||||||||||||||||||||
|
Converts a full 'dmy h:m:s' date value into a timestamp.
Implements sword::Calendar. |
|
||||||||||||||||||||
|
Converts a timestamp into a 'dmy' date value.
Implements sword::Calendar. |
|
||||||||||||||||||||||||||||||||||||
|
Converts a timestamp into a full 'dmy h:m:s' date value.
Implements sword::Calendar. |
|
||||||||||||||||||||
|
Computes the day/month/year from the number of days.
Implements sword::Calendar. |
|
|
Number of days from 1/1/1601 to 1/1/year.
Implements sword::CalendarWestern. |
|
||||||||||||
|
Computes the number of days in a month.
Implements sword::CalendarWestern. |
|
|
Computes the number of days in a year.
Implements sword::CalendarWestern. |
|
||||||||||||||||
|
Computes the number of this day within its year (Jan 1st returns 0).
Implements sword::CalendarWestern. |
|
||||||||||||||||
|
Number of days to day/month/year.
Implements sword::Calendar. |
|
|
Computes the easter date for a given year.
Implements sword::CalendarWestern. |
|
|
Checks whether a year is a leap year or not.
Implements sword::CalendarWestern. |
|
||||||||||||||||||||||||||||||||
|
Validates a 'dmy h:m:s' date value within this Calendar.
Implements sword::Calendar. |
|
|
Computes the day of the week (0=Sunday to 6=Saturday).
Implements sword::CalendarWestern. |
1.3-rc2