PHP função 5 Calendário
PHP Calendário Introdução
extensão de calendário contém uma conversão de formato simplificado entre a função de calendário diferente.
É a Julian Day Count (contagem de dia Juliano), a partir de 4713 aC 01 de janeiro contou com.
NOTA: Para converter entre formatos de calendário, você deve primeiro converter para Julian Day Count, então você precisa converter um formato de calendário.
NOTA: Julian Day Count (contagem de dias Julian) com o Julian Calendar (calendário juliano) não é o mesmo!
instalar
Para que estas funções funcionem, você deve passar --enable-calendário para compilar o PHP.
A versão para Windows do PHP tem suporte embutido para a extensão do calendário. Portanto, a função Calendar irá funcionar automaticamente.
PHP função 5 Calendário
函数 | 描述 |
---|---|
cal_days_in_month() | 针对指定的年份和历法,返回一个月中的天数。 |
cal_from_jd() | 把儒略日计数转换为指定历法的日期。 |
cal_info() | 返回有关指定历法的信息。 |
cal_to_jd() | 把指定历法的日期转换为儒略日计数。 |
easter_date() | 返回指定年份的复活节午夜的 Unix 时间戳。 |
easter_days() | 返回指定年份的复活节与 3 月 21 日之间的天数。 |
frenchtojd() | 把法国共和历法的日期转换成为儒略日计数。 |
gregoriantojd() | 把格利高里历法的日期转换成为儒略日计数。 |
jddayofweek() | 返回日期在周几。 |
jdmonthname() | 返回月的名称。 |
jdtofrench() | 把儒略日计数转换为法国共和历法的日期。 |
jdtogregorian() | 把儒略日计数转换为格利高里历法的日期。 |
jdtojewish() | 把儒略日计数转换为犹太历法的日期。 |
jdtojulian() | 把儒略日计数转换为儒略历法的日期。 |
jdtounix() | 把儒略日计数转换为 Unix 时间戳。 |
jewishtojd() | 把犹太历法的日期转换为儒略日计数。 |
juliantojd() | 把儒略历法的日期转换为儒略日计数。 |
unixtojd() | 把 Unix 时间戳转换为儒略日计数。 |
PHP 5 constantes predefinidas Calendário
常量 | 类型 | PHP 版本 |
---|---|---|
CAL_GREGORIAN | Integer | PHP 4 |
CAL_JULIAN | Integer | PHP 4 |
CAL_JEWISH | Integer | PHP 4 |
CAL_FRENCH | Integer | PHP 4 |
CAL_NUM_CALS | Integer | PHP 4 |
CAL_DOW_DAYNO | Integer | PHP 4 |
CAL_DOW_SHORT | Integer | PHP 4 |
CAL_DOW_LONG | Integer | PHP 4 |
CAL_MONTH_GREGORIAN_SHORT | Integer | PHP 4 |
CAL_MONTH_GREGORIAN_LONG | Integer | PHP 4 |
CAL_MONTH_JULIAN_SHORT | Integer | PHP 4 |
CAL_MONTH_JULIAN_LONG | Integer | PHP 4 |
CAL_MONTH_JEWISH | Integer | PHP 4 |
CAL_MONTH_FRENCH | Integer | PHP 4 |
CAL_EASTER_DEFAULT | Integer | PHP 4.3 |
CAL_EASTER_ROMAN | Integer | PHP 4.3 |
CAL_EASTER_ALWAYS_GREGORIAN | Integer | PHP 4.3 |
CAL_EASTER_ALWAYS_JULIAN | Integer | PHP 4.3 |
CAL_JEWISH_ADD_ALAFIM_GERESH | Integer | PHP 5.0 |
CAL_JEWISH_ADD_ALAFIM | Integer | PHP 5.0 |
CAL_JEWISH_ADD_GERESHAYIM | Integer | PHP 5.0 |