PHP cal_info() 函数

PHP 教程 · 2019-01-23 06:42:26

实例

返回格利高里历法的信息:

<?php
print_r(cal_info(0));
?>

定义和用法

cal_info() 函数返回有关指定历法的信息。

语法

cal_info(calendar);

参数 描述
calendar 可选。规定一个表示要使用的历法的数字。可以使用下面这些常量:
  • 0 = CAL_GREGORIAN
  • 1 = CAL_JULIAN
  • 2 = CAL_JEWISH
  • 3 = CAL_FRENCH

提示:如果 calendar 参数被省略,cal_info() 返回有关所有历法的信息。

技术细节

返回值: 返回包含如下日历元素的数组:
  • calname
  • calsymbol
  • month
  • abbrevmonth
  • maxdaysinmonth
PHP 版本: 4.1+
更新日志: 在 PHP 5.0 中,calendar 参数是可选的。

点击查看所有 PHP 教程 文章: https://codercto.com/courses/l/5.html

查看所有标签

PHP and MySQL Web Development (3rd Edition) (Developer's Library

PHP and MySQL Web Development (3rd Edition) (Developer's Library

Luke Welling、Laura Thomson / Sams / 2004-09-29 / USD 49.99

We've taken the best and made it even better. The third edition of the best-selling PHP and MySQL Web Development has been updated to include material and code on MySQL 5, PHP 5 and on PHPs object mod......一起来看看 《PHP and MySQL Web Development (3rd Edition) (Developer's Library》 这本书的介绍吧!

CSS 压缩/解压工具
CSS 压缩/解压工具

在线压缩/解压 CSS 代码

JSON 在线解析
JSON 在线解析

在线 JSON 格式化工具

HSV CMYK 转换工具
HSV CMYK 转换工具

HSV CMYK互换工具