Sie sind auf Seite 1von 3

cal_days_in_month(calendar,month,year) <?php $d=cal_days_in_month(CAL_GREGORIAN,10,2005); echo("There was $d days in October 2005"); ?> cal_from_jd(jd,calendar) jd Required.

A number (a Julian day count) calendar Required. Specifies the calendar to use. The following calendar values can be used: CAL_GREGORIAN CAL_JULIAN CAL_JEWISH CAL_FRENCH <?php $d=unixtojd(mktime(0,0,0,1,18,2006)); print_r(cal_from_jd($d,CAL_GREGORIAN)); ?> cal_info(calendar) calendar Optional. Specifies the calendar. The following calendar values can be used: 0 = CAL_GREGORIAN 1 = CAL_JULIAN 2 = CAL_JEWISH 3 = CAL_FRENCH <?php $calinfo=cal_info(0); print_r($calinfo); ?> cal_to_jd(calendar,month,day,year) calendar Required. Specifies the calendar to use. The following calendar values can be used: CAL_GREGORIAN CAL_JULIAN CAL_JEWISH CAL_FRENCH month day year Required. Specifies the month Required. Specifies the day Required. Specifies the year

<?php $d=cal_to_jd(CAL_GREGORIAN,10,03,2005); echo($d); ?> easter_date(year) year Optional. Defines the year to calculate the midnight on Easter from. If the year parameter is omitted, the current year is used. <?php

echo(easter_date() . "<br />"); echo(date("M-d-Y",easter_date()) . "<br />"); echo(date("M-d-Y",easter_date(2000)) . "<br />"); echo(date("M-d-Y",easter_date(2001)) . "<br />"); echo(date("M-d-Y",easter_date(2002))); ?> easter_days(year,method) year Optional. Defines the year to calculate the midnight on Easter from. If the year parameter is omitted, the current year is used. method Optional. Allows you to calculate Easter dates based on other calendars. E.g. it uses the Gregorian calendar during the years 1582 - 1752 when set to CA L_EASTER_ROMAN <?php echo(easter_days() . "<br />"); echo(easter_days(1990) . "<br />"); echo(easter_days(1342) . "<br />"); echo(easter_days(2050); ?> gregoriantojd(month,day,year) month Required. Specifies the month day Required. Specifies the day year Required. Specifies the year. Valid range is from 4714 B.C. to 9999 A.D. <?php $jd = gregoriantojd(10,3,1975); echo($jd . "<br />");$gregorian = jdtogregorian($jd); echo($gregorian); ?> jddayofweek(jd,mode) jd mode Required. A number (a Julian day count) Optional. Defines what to return (integer or string). Mode values: 0 - Default. Returns the day number as an int (0=Sunday, 1=Monday, etc) 1 - Returns a string that contains the day of week (English-Gregorian) 2 - Returns a string that contains the abbreviated day of week (EnglishGregorian) <?php $jd=cal_to_jd(CAL_GREGORIAN,date("m"),date("d"),date("Y")); echo(jddayofweek($jd,1)); ?> jdmonthname(jd,mode) jd Required. A number (a Julian day count) mode Optional. Defines which calendar to convert the Julian day count to, and what type of month names are to be returned. Mode values: 0 - Gregorian - abbreviated (Jan, Feb, Mar, etc.) 1 - Gregorian (January, February, March, etc.) 2 - Julian - abbreviated (Jan, Feb, Mar, etc.) 3 - Julian (January, February, March, etc.) 4 - Jewish (Tishri, Heshvan, Kislev, etc.) 5 - French Republican (Vendemiaire, Brumaire, Frimaire, etc.) <?php

$jd=cal_to_jd(CAL_GREGORIAN,date("m"),date("d"),date("Y")); echo(jdmonthname($jd,1)); ?> jdtogregorian(jd) jd Required. A number (a Julian day count)

<?php $jd = gregoriantojd(10,3,1975); echo($jd . "<br />");$gregorian = jdtogregorian($jd); echo($gregorian); ?>

Das könnte Ihnen auch gefallen