PHP JDDayOfWeek

Education is not limited to just classrooms. It can be gained anytime, anywhere... - Ravi Ranjan (M.Tech-NIT)

PHP : jddayofweek() function

Description

The jddayofweek() function is used to get the day of a week.

Version

(PHP 4 and above)

Syntax

jddayofweek(julian_day, mode)

Parameters

Name

Description

Required /
Optional

Type

julian_day

A Julian day number.

Required

Integer

mode

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

Optional

Integer

Return value

The day of the week.

Value Type : Mixed*.

*Mixed : Mixed indicates multiple (but not necessarily all) types.

Example :

  1. $jd_day=cal_to_jd(CAL_GREGORIAN, 12, 25, 2005);  

  2. echo(jddayofweek($jd_day,1));  

  3. ?>  

Output :

Sunday