Suscriber with us



Receive HTML?

Syndicate

Calendar functions PDF Print E-mail

PHP Calendar Introduction

The calendar functions are useful when working with different calendar formats.

The standard it is basedon is the Julian day count (Julian day count is a count of days starting from January 1, 4713 B.C.).Note: that the Julian day count is not the same as the Julian calendar!

Note: To convert between calendar formats, you must first convert to Julian day count, then to the calendar format.

Installation

The windows version of PHP has built-in support for the calendar extension. So, the calendar functions will work automatically.

However, if you are running the Linux version of PHP, you will have to compile PHP with --enable-calendar to get the calendar functions to work.

PHP Calendar Functions

PHP: indicates the earliest version of PHP that supports the function.

Function Description PHP

cal_days_in_month() 

Returns the number of days in a month for a specified year and calendar 

cal_from_jd()

Converts a Julian day count into a date of a specified calendar 

cal_info() 

Returns information about a given calendar 

cal_to_jd() 

Converts a date to Julian day count 4

easter_date() 

Returns the Unix timestamp for midnight on Easter of a specified year 

easter_days() 

Returns the number of days after March 21, on which Easter falls for a specified year 

FrenchToJD() 

Converts a French Republican date to a Julian day count 

GregorianToJD() 

Converts a Gregorian date to a Julian day count 

JDDayOfWeek() 

Returns the day of a week 3

JDMonthName() 

Returns a month name 

JDToFrench() 

Converts a Julian day count to a French Republican date 

JDToGregorian() 

Converts a Julian day count to a Gregorian date 

jdtojewish() 

Converts a Julian day count to a Jewish date 

JDToJulian() 

Converts a Julian day count to a Julian date 

jdtounix() 

Converts a Julian day count to a Unix timestamp 

JewishToJD() 

Converts a Jewish date to a Julian day count 

JulianToJD() 

Converts a Julian date to a Julian day count 

unixtojd() 

Converts a Unix timestamp to a Julian day count 




Last Updated ( Thursday, 03 April 2008 )
 
< Prev   Next >

Polls

Which is the best Scripting language?