JDDayOfWeek() function in PHP

PHPz
Release: 2023-09-16 18:06:01
forward
1274 people have browsed it

JDDayOfWeek() function in PHP

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

Syntax

jddayofweek(julian_day, mode)
Copy after login

Parameters

  • julian_day - Julian day number.

  • Pattern - Specifies the weekly pattern. Possible values:

    • 0 - Default value. Returns the day of the week as an integer (0=Sunday, 1=Monday, etc.)

    • 1 - Returns the day of the week as a string (Sunday, Monday, etc.)

    • 1 - Returns the day of the week (Sunday, Monday, etc.) as a string

    • 2 - Returns the weekday as a string, in abbreviated form (Sun, Monday, etc.) Mon, Tue, etc.)

  • < /ul>

    Return

    The JDDayOfWeek() function returns the day of the week in the form of a string or integer.

    Example

    The following is an example-

    Live demonstration

    <?php
       $res = gregoriantojd(5,8,2018);
       echo jddayofweek($res,1);
    ?>
    Copy after login

    Output

    The following is the output-

    Tuesday
    Copy after login

    The above is the detailed content of JDDayOfWeek() function in PHP. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:tutorialspoint.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template