PHP cal_from_jd() 函数

PHP 教程 · 2019-01-23 06:28:50

实例

把儒略日计数转换为格利高里历法的日期:

<?php
$d=unixtojd(mktime(0,0,0,6,20,2007));
print_r(cal_from_jd($d,CAL_GREGORIAN));
?>

定义和用法

cal_from_jd() 函数把儒略日计数转换为指定历法的日期。

语法

cal_from_jd(jd,calendar);

参数 描述
jd 必需。一个数字(儒略日计数)。
calendar 必需。规定要使用的历法。可以使用下面这些常量:
  • CAL_GREGORIAN
  • CAL_JULIAN
  • CAL_JEWISH
  • CAL_FRENCH

技术细节

返回值: 返回包含如下日历信息的数组:
  • 日期,形式为 "月/日/年"
  • 月
  • 年
  • 一周中的第几天
  • 工作日和月的缩写和全名
PHP 版本: 4.1+

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

查看所有标签

New Dark Age

New Dark Age

James Bridle / Verso Books / 2018-7-17 / GBP 16.99

As the world around us increases in technological complexity, our understanding of it diminishes. Underlying this trend is a single idea: the belief that our existence is understandable through comput......一起来看看 《New Dark Age》 这本书的介绍吧!

JS 压缩/解压工具
JS 压缩/解压工具

在线压缩/解压 JS 代码

SHA 加密
SHA 加密

SHA 加密工具

XML 在线格式化
XML 在线格式化

在线 XML 格式化压缩工具