August 2003
Intermediate to advanced
1104 pages
19h 27m
English
PHP offers a powerful way to convert dates from one calendar system to another. In order to do this, you must first convert a date into a Julian Day Count. You then convert that integer back into a date according to another calendar.
These functions require the calendar extension. You may load it dynamically, or compile it into PHP.
The cal_days_in_month function (Listing 14.13) returns the number of days in a month for a given calendar's month and year. Use one of the constants in Table 14.6 to specify the calendar.
| Constant | Description |
|---|---|
| CAL_FRENCH | French Republican Calendar |
| CAL_GREGORIAN | Gregorian Calendar |
| CAL_JEWISH ... |
Read now
Unlock full access