I l@ve RuBoard Previous Section Next Section

Chapter 4. Calendar Functions

The calendar functions focus on converting dates between calendar systems and getting information about dates. The conversion functions either convert a date from a specific calendar system to a Julian day count or convert a Julian day count to a date for a specific calendar system. Julian day counts are a calendar system first introduced in the 16th century for use in astronomical calculations. A Julian day count is the number of days that have passed since noon on January 1, 4713 B.C. (according to the Julian calendar). The sequential, non-repeating nature of Julian days makes them ideal for calculating intervals between events and for acting as a kind of lingua franca for converting between calendar systems. One thing to keep in mind when using Julian day counts is that the Julian day starts at noon, while the civil day in the Julian and Gregorian calendars starts at midnight. For more information on the other calendar systems that are handled by these functions, see the entries in this chapter.

The calendar functions complement the date and time functions very well. See the "Date and Time Functions" chapter for more information.

PHP needs to be built with --enable-calendar for these functions to be available.

    I l@ve RuBoard Previous Section Next Section