Latest web development tutorials

PHP jddayofweek () function

PHP Calendar Reference Manual PHP Calendar Reference Manual

Examples

Back January 13, 1998 the day of the week:

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

Running instance »

Definition and Usage

jddayofweek () function returns the date in a few weeks.

grammar

jddayofweek( jd,mode);

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

technical details

return value: String or integer (depending on the mode parameter) returns the Gregorian calendar showing the days of the week.
PHP version: 4+


PHP Calendar Reference Manual PHP Calendar Reference Manual