HOME HTML CSS JAVASCRIPT SQL PHP JQUERY XML ASP.NET MORE...
REFERENCES | EXAMPLES | FORUM | ABOUT

PHP jddayofweek() Function

PHP Calendar Reference PHP Calendar Reference

Example

Return the weekday of 13th January, 1998:

<?php
$jd=gregoriantojd(1,13,1998);
echo jddayofweek($jd,1);
?>

Run example »

Definition and Usage

The jddayofweek() function returns the day of the week.


Syntax

jddayofweek(jd,mode);

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.)

Technical Details

Return Value: Returns the Gregorian weekday as a string or integer (depends on the mode parameter)
PHP Version: 4+


PHP Calendar Reference PHP Calendar Reference

Your suggestion:

Close [X]

Thank You For Helping Us!

Your message has been sent to W3Schools.

Close [X]
Search w3schools.com:

WEB BUILDING

Download XML Editor FREE Website BUILDER Free HTML5 Templates

SHARE THIS PAGE