PHP: jddayofweek() function
Returns the day of the week
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
Previous: GregorianToJD
Next: JDMonthName
It will be nice if you may share this link in any developer community or anywhere else, from where other developers may find this content. Thanks.
https://www.w3resource.com/php/function-reference/JDDayOfWeek.php
- Weekly Trends and Language Statistics
- Weekly Trends and Language Statistics