w3resource
PHP Tutorial

PHP: jddayofweek() function

Description

The jddayofweek() function is used to get the day of a week.

Version:

(PHP 4 and above)

Syntax:

jddayofweek(julian_day, mode)

Parameter:

Name Description Required /
Optional
Type
julian_day A Julian day number. Required Integer
mode 0 - Returns the day number as an integer. (0= Sunday, 1= Monday, etc).
1 - Returns string containing the day of the week (English-Gregorian).
2 - Return a string containing the abbreviated day of the week (English- Gregorian) .
Optional Integer

Return value:

The day of the week.

Value Type: Mixed*.

*Mixed : Mixed indicates multiple (but not necessarily all) types.

Example:

<?php
$jd_day=cal_to_jd(CAL_GREGORIAN, 12, 25, 2005);
echo(jddayofweek($jd_day,1));
?>

Sample Output:

Sunday 

View the example in the browser

See also

PHP Function Reference

Previous: GregorianToJD
Next: JDMonthName



New Content: Composer: Dependency manager for PHP, R Programming


bedava porno