jddayofweek
Returns the day of the week
Syntax
jddayofweek ( int $julianday [, int $mode = CAL_DOW_DAYNO ] ) : mixed
Parameters
julianday
A julian day number as integer
mode
Number | Name | 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
julianday
<? $julianday = unixtojd(); $return = jddayofweek($julianday); echo $return; ?>
5
mode | CAL_DOW_DAYNO
<? $julianday = unixtojd(); $mode = CAL_DOW_DAYNO; $return = jddayofweek($julianday, $mode); echo $return; ?>
5
mode | CAL_DOW_LONG
<? $julianday = unixtojd(); $mode = CAL_DOW_LONG; $return = jddayofweek($julianday, $mode); echo $return; ?>
Friday
mode | CAL_DOW_SHORT
<? $julianday = unixtojd(); $mode = CAL_DOW_SHORT; $return = jddayofweek($julianday, $mode); echo $return; ?>
Fri