Latest web development tutorials
×

PHP cours

PHP cours PHP Brève introduction PHP installer PHP grammaire PHP variable PHP echo/print PHP Types de données PHP constante PHP chaîne PHP opérateurs PHP If...Else PHP Switch PHP tableau PHP Tri d'un tableau PHP Superglobales PHP While circulation PHP For circulation PHP fonction PHP Variables magiques PHP Namespaces PHP Object-Oriented

PHP forme

PHP forme PHP Authentification Forms PHP forme - Les champs obligatoires PHP forme - email de vérification et d'URL PHP Complète instance de formulaire PHP $_GET variable PHP $_POST variable

PHP Tutorial avancée

PHP Les tableaux multidimensionnels PHP date PHP contenir PHP fichier PHP File Upload PHP Cookie PHP Session PHP E-mail PHP sécurité E-mail PHP Error PHP Exception PHP filtre PHP filtre avancé PHP JSON

PHP 7 Nouvelles fonctionnalités

PHP 7 Nouvelles fonctionnalités

PHP Base de données

PHP MySQL Brève introduction PHP MySQL raccordement PHP MySQL La création d'une base de données PHP MySQL Créer une table de données PHP MySQL Insérer des données PHP MySQL Insérez des données multiples PHP MySQL Déclarations préparées PHP MySQL Lire les données PHP MySQL WHERE PHP MySQL ORDER BY PHP MySQL UPDATE PHP MySQL DELETE PHP ODBC

PHP XML

XML Expat Parser XML DOM XML SimpleXML

PHP & AJAX

AJAX Brève introduction AJAX PHP AJAX Base de données AJAX XML AJAX Recherche en temps réel AJAX RSS Reader AJAX vote

PHP Manuel de référence

PHP Array PHP Calendar PHP cURL PHP Date PHP Directory PHP Error PHP Filesystem PHP Filter PHP FTP PHP HTTP PHP Libxml PHP Mail PHP Math PHP Misc PHP MySQLi PHP PDO PHP SimpleXML PHP String PHP XML PHP Zip PHP Timezones PHP Traitement de l'image PHP RESTful

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