The JDDayOfWeek() function returns the day of the week.
jddayofweek(julian_day, mode)
julian_day - Julian day number.
Pattern - Specifies the weekly pattern. Possible values:
0 - Default value. Returns the day of the week as an integer (0=Sunday, 1=Monday, etc.)
1 - Returns the day of the week as a string (Sunday, Monday, etc.)
1 - Returns the day of the week (Sunday, Monday, etc.) as a string p>
2 - Returns the weekday as a string, in abbreviated form (Sun, Monday, etc.) Mon, Tue, etc.)
The JDDayOfWeek() function returns the day of the week in the form of a string or integer.
The following is an example-
Live demonstration
<?php $res = gregoriantojd(5,8,2018); echo jddayofweek($res,1); ?>
The following is the output-
Tuesday
The above is the detailed content of JDDayOfWeek() function in PHP. For more information, please follow other related articles on the PHP Chinese website!