jddayofweek(): getting week day

We can get day of the week in different formats by using jddayofweek function. This function takes Julian day number as integer and returns the day . Here is the syntax
jddayofweek(Julian_day_numnber, mode )
Here is an example.
$day_number = cal_to_jd(CAL_GREGORIAN,5,4,2013);
$week_day = jddayofweek($day_number,0);
echo $week_day;
The output will be 6.
As we have used default format so the function will return 0 for Sunday , 1 for Monday ...
If we change the format like this
$week_day = jddayofweek($day_number,1);
The output will be Saturday
$week_day = jddayofweek($day_number,2);
The output will be Sat
Month name from Julian day count
Calendar Functions
Subscribe to our YouTube Channel here


Subscribe

* indicates required
Subscribe to plus2net

    plus2net.com



    Post your comments , suggestion , error , requirements etc here





    PHP video Tutorials
    We use cookies to improve your browsing experience. . Learn more
    HTML MySQL PHP JavaScript ASP Photoshop Articles FORUM . Contact us
    ©2000-2023 plus2net.com All rights reserved worldwide Privacy Policy Disclaimer