PHP jddayofweek() function

PHP gregoriantojd() function
PHP jdmonthname() function

In this article, you will learn how to get the day of the week. The jddayofweek() function does the job in PHP.

What is the syntax of the jddayofweek() function in PHP?

jddayofweek(jd,mode);
ParameterDescription
jdThe Julian day number – Required
modeUsed to select the output of the day of the week.
0 – Default – Return as numeric digit like 0 (equal to Sunday), 1 (equals to Monday)…
1 – Return the weekday as String (Sunday, Monday, Tuesday…)
2 – Return the short form of the weekday (Sun, Mon, Tue…)
PHP jddayofweek() method

Examples of the jddayofweek() function

Example 1. The following example returns the day of the week of 4th January 1998 (my birthday :-)).

<?php
$j_d=gregoriantojd(1,04,1998);
echo jddayofweek($j_d,1);
?>

PHP gregoriantojd() function
PHP jdmonthname() function
en English
X
Scroll to Top