Current Location: Home> Function Categories> jddayofweek

jddayofweek

Return to the date of the week.
Name:jddayofweek
Category:Uncategorized
Programming Language:php
One-line Description:Return to the date of the week.

Definition and usage

jddayofweek() function returns the date of the week.

Example

Return to October 15, 1980, which day is the week:

 <?php
$jd = gregoriantojd ( 10 , 15 , 1980 ) ;
echo jddayofweek ( $jd , 1 ) ;
?>

Run the instance

grammar

 jddayofweek ( jd , mode ) ;
parameter describe
jd Required. Numbers (Julian day count).
mode

Optional. Defines how to return the week (number or string). It 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 - Return the day of the week as a string. (Sunday, Monday, ...)
  • 2 - Return the week's day as a string, abbreviation. (Sun, Mon, ...)
Similar Functions
Popular Articles