JDDayOfWeek – Return Day of Week from Julian Day Number (PHP)
The JDDayOfWeek PHP function returns the day of the week for a given Julian day number, offering numeric or English string results based on an optional mode parameter, making it useful for date calculations in backend development.
The
mixed jddayofweek (int $julianday[, int $mode = CAL_DOW_DAYNO])function returns the day of the week for a given Julian day number. Depending on the $mode parameter, the result can be an integer (0=Sunday … 6=Saturday) or a string representation in English, either full or abbreviated.
Parameters
$julianday : a Julian day number.
$mode (optional): 0 (default) returns numeric day, 1 returns full English name, 2 returns abbreviated English name.
Return value
Either an integer or a string representing the day of the week, according to the selected mode.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Laravel Tech Community
Specializing in Laravel development, we continuously publish fresh content and grow alongside the elegant, stable Laravel framework.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
