jddayofweek

Returns the day of the week

Syntax

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

Parameters

julian_day

A julian day number as integer

mode

Number Constant Description
0 CAL_DOW_DAYNO Return the day number as an int (0=Sunday, 1=Monday, etc)
1 CAL_DOW_LONG Returns string containing the day of week (English-Gregorian)
2 CAL_DOW_SHORT Return a string containing the abbreviated day of week (English-Gregorian)

Return

The gregorian weekday as either an integer or string.

Examples

1 · julian_day

<?

$julian_day = unixtojd();

$return = jddayofweek($julian_day);

echo $return;

?>
3

2 · mode · CAL_DOW_DAYNO

<?

$julian_day = unixtojd();
$mode = CAL_DOW_DAYNO;

$return = jddayofweek($julian_day, $mode);

echo $return;

?>
3

3 · mode · CAL_DOW_LONG

<?

$julian_day = unixtojd();
$mode = CAL_DOW_LONG;

$return = jddayofweek($julian_day, $mode);

echo $return;

?>
Wednesday

4 · mode · CAL_DOW_SHORT

<?

$julian_day = unixtojd();
$mode = CAL_DOW_SHORT;

$return = jddayofweek($julian_day, $mode);

echo $return;

?>
Wed

cal_days_in_month

cal_from_jd

cal_info

cal_to_jd

easter_date

easter_days

frenchtojd

gregoriantojd

jdmonthname

jdtofrench

jdtogregorian

jdtojewish

jdtojulian

jdtounix

jewishtojd

juliantojd

unixtojd

PHP

Home Menu