Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

PHP jddayofweek() Function

PHP jddayofweek() Function

PHP Calendar Reference Manual PHP Calendar Reference Manual

Example

Return the day of the week for January 13, 1998:

Run Example »


Definition and Usage

The jddayofweek() function returns the day of the week for a date.

Syntax

jddayofweek(

jd,mode);

Parameters Description
jd Required. A number (the Julian day count).
mode Optional. Defines how the day of the week is returned (as a number or a string). Can be one of the following values:
  • 0 - Default. Returns the day of the week as an integer (0 is Sunday, 1 is Monday, and so on).
  • 1 - Returns the day of the week as a string (Sunday, Monday, ...).
  • 2 - Returns the day of the week as an abbreviated string (Sun, Mon, ...).
  • |

    Technical Details

    Return Value: Returns the day of the week in the Gregorian calendar as a string or an integer (depending on the mode parameter).
    PHP Version: 4+

    PHP Calendar Reference Manual PHP Calendar Reference Manual