Le meilleur didacticiel Fonction PHP 5 Calendrier en 2024, dans ce didacticiel, vous pouvez apprendre PHP Calendrier Présentation,installer,Fonction PHP 5 Calendrier,PHP 5 constantes prédéfinies Calendrier,

Fonction PHP 5 Calendrier

PHP Calendrier Présentation

extension Calendar contient une conversion de format simplifié entre la fonction de calendrier différent.

Il est le nombre de jours Julien (Julian compte de jours), à partir de 4713 BC 1 Janvier compter.

REMARQUE: Pour convertir entre formats de calendrier, vous devez d' abord convertir en nombre de jours Julien, alors vous avez besoin de convertir un format de calendrier.

NOTE: nombre de jours Julien (nombre de jour julien) avec le calendrier julien (calendrier julien) ne sont pas la même chose!


installer

Pour que ces fonctions au travail, vous devez passer --enable-calendrier pour compiler PHP.

La version Windows de PHP a un support intégré pour l'extension du calendrier. Par conséquent, la fonction de calendrier fonctionnera automatiquement.


Fonction PHP 5 Calendrier

函数 描述
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 prédéfinies Calendrier

常量 类型 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
Fonction PHP 5 Calendrier
10/30