PHP jddayofweek() 函数

PHP 教程 · 2019-01-23 08:14:42

实例

返回 1998 年 1 月 13 日这天是周几:

<?php
$jd=gregoriantojd(1,13,1998);
echo jddayofweek($jd,1);
?>

定义和用法

jddayofweek() 函数返回日期在周几。

语法

jddayofweek(jd,mode);

参数 描述
jd 必需。数字(儒略日计数)。
mode 可选。定义如何返回周几(数字还是字符串)。可以是下列值中的一个:
  • 0 - 默认。以整数返回周的天。(0 为周日, 1 为周一... 依此类推)
  • 1 - 以字符串返回周的天。(Sunday, Monday, ...)
  • 2 - 以字符串返回周的天,简写形式。(Sun, Mon, ...)

技术细节

返回值: 以字符串或者整数(取决于 mode 参数)返回格利高里历法表示的周的天。
PHP 版本: 4+

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

查看所有标签

The Tangled Web

The Tangled Web

Michal Zalewski / No Starch Press / 2011-11-26 / USD 49.95

"Thorough and comprehensive coverage from one of the foremost experts in browser security." -Tavis Ormandy, Google Inc. Modern web applications are built on a tangle of technologies that have been de......一起来看看 《The Tangled Web》 这本书的介绍吧!

RGB HSV 转换
RGB HSV 转换

RGB HSV 互转工具

HEX HSV 转换工具
HEX HSV 转换工具

HEX HSV 互换工具