PHP jddayofweek() Function

❮ 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 Values

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
Copyright 1999-2023 by Refsnes Data. All Rights Reserved.