PHP Calendar Functions
EditRocket provides the following information on Calendar functions in the PHP source code builder.
int cal_days_in_month ( int $calendar , int $month , int $year ) - This function will return the number of days in the month of year for the specified calendar.
array cal_from_jd ( int $jd , int $calendar ) - cal_from_jd() converts the Julian day given in jd into a date of the specified calendar. Supported calendar values are CAL_GREGORIAN, CAL_JULIAN, CAL_JEWISH and CAL_FRENCH.
array cal_info ([ int $calendar ] ) - cal_info() returns information on the specified calendar.
int cal_to_jd ( int $calendar , int $month , int $day , int $year ) - cal_to_jd() calculates the Julian day count for a date in the specified calendar. Supported calendars are CAL_GREGORIAN, CAL_JULIAN, CAL_JEWISH and CAL_FRENCH.
int easter_date ([ int $year ] ) - Returns the Unix timestamp corresponding to midnight on Easter of the given year.
int easter_days ([ int $year [, int $method ]] ) - Returns the number of days after March 21 on which Easter falls for a given year. If no year is specified, the current year is assumed.
int frenchtojd ( int $month , int $day , int $year ) - Converts a date from the French Republican Calendar to a Julian Day Count.
int gregoriantojd ( int $month , int $day , int $year ) - Valid Range for Gregorian Calendar 4714 B.C. to 9999 A.D.
mixed jddayofweek ( int $julianday [, int $mode ] ) - Returns the day of the week. Can return a string or an integer depending on the mode.
string jdmonthname ( int $julianday , int $mode ) - Returns a string containing a month name. mode tells this function which calendar to convert the Julian Day Count to, and what type of month names are to be returned.
string jdtofrench ( int $juliandaycount ) - Converts a Julian Day Count to the French Republican Calendar.
string jdtogregorian ( int $julianday ) - Converts Julian Day Count to a string containing the Gregorian date in the format of month/day/year.
string jdtojewish ( int $juliandaycount [, bool $hebrew [, int $fl ]] ) - Converts a Julian Day Count to the Jewish Calendar.
string jdtojulian ( int $julianday ) - Converts Julian Day Count to a string containing the Julian Calendar Date in the format of month/day/year.
int jdtounix ( int $jday ) - This function will return a Unix timestamp corresponding to the Julian Day given in jday or FALSE if jday is not inside the Unix epoch (Gregorian years between 1970 and 2037 or 2440588 <= jday <= 2465342 ). The time returned is localtime (and not GMT).
int jewishtojd ( int $month , int $day , int $year ) - Although this function can handle dates all the way back to the year 1 (3761 B.C.), such use may not be meaningful. The Jewish calendar has been in use for several thousand years, but in the early days there was no formula to determine the start of a month. A new month was started when the new moon was first observed.
int juliantojd ( int $month , int $day , int $year ) - Valid Range for Julian Calendar 4713 B.C. to 9999 A.D.
int unixtojd ([ int $timestamp ] ) - Return the Julian Day for a Unix timestamp (seconds since 1.1.1970), or for the current day if no timestamp is given.