PHP jddayofweek() Function

PHP jddayofweek Function


Definition :

The jddayofweek() function is a built-in function in PHP.the jddayofweek() function is used to returns the day of the week.

Syntax

   jddayofweek(jd,mode);

Parameter 

Parameter Description
jd Required. A Julian Day number
mode Optional. Specifies how to return the weekday. Can have one of the following values:
  • 0 - Default. Returns the weekday as an integer (0=Sunday, 1=Monday, etc.)
  • 1 - Returns the weekday as a string (Sunday, Monday, etc.)
  • 2 - Returns the weekday as a string, abbreviated form (Sun, Mon, etc.)

 Following given example return the weekday of 20th March, 2008.

Output : Thursday