Why does php gives same result for every date I enter?

I don’t know what is usually wrong, Concerning this small piece of code
indicate date(“l”, 2009-7-1);
the date is likely to be anything
plainly enter
2009-10-09
or
2009-10-19
or
2009-11-01
or
2009-12-03
or
2009-01-01
or
2009-04-13

will usually output thursday “WTF”
I 1st thought it is my php setting up but absolutely no I tested out online php testers and they also all return the same day, Thursday

In line with me that should no problem me the morning of the specified date, right
so if it absolutely was may SEVEN 2011 it should come back Sunday although if it was may SEVERAL 2011 them should returning Saturday or maybe am WHEN I wrong
if you have how was I likely to get just what exactly day belonging to the week has been an particular date

I discovered this via a quick Google search

date(“l”, mktime(0, 0, 0, 8, 1, 2000));

This prints a single day of the actual week upon July 13th, 2000.Try it with your code.

Leave a Reply