On Sunday 18 August 2002 09:38, Kenton Letkeman wrote: > I have been able to get yesterdays date > eg. $yesterday = date('d')-1; result is "17" > but am having trouble getting yesterdays day of the week. > eg. $yesterday = date('D')-1; result is "-1" > eg. $yesterday = date('l')-1; result is "-1" > > Is there something I am missing?
You're trying to subtract 1 from a string. > I cannot find the documentation on this. I'm flabbergasted -- where did you look? The proper way of doing this (ie getting yesterday's day of week and not subtracting 1 from a string) is to look at the examples in manual. -- Jason Wong -> Gremlins Associates -> www.gremlins.com.hk Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * /* Who loves not wisely but too well Will look on Helen's face in hell, But he whose love is thin and wise Will view John Knox in Paradise. -- Dorothy Parker */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php