php8.5
Home/ Manual/ calendar / functions/ jddayofweek

jddayofweek

PHP function Edit on GitHub ✎

(PHP 4, PHP 5, PHP 7, PHP 8)

Returns the day of the week

Description

jddayofweek(int $julian_day, int $mode = CAL_DOW_DAYNO): int|string

Returns the day of the week. Can return a string or an integer depending on the mode.

Parameters

julian_day

A julian day number as integer

mode
ModeMeaning
0 (Default)Return the day number as an int (0=Sunday, 1=Monday, etc)
1Returns string containing the day of week (English-Gregorian)
2Return a string containing the abbreviated day of week (English-Gregorian)

Return Values

The gregorian weekday as either an integer or string.

Source: reference/calendar/functions/jddayofweek.xml · from the official PHP manual (php/doc-en)