Try
Main Topics
Browse All TopicsHi,
If I have a date such as 08/11/2009 (format is DD/MM/YYYY).
Is there a way to check if the date is Sunday and if so add an extra day to this so that it will display Mondays date instead?
Thanks in advance for your feedback.
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Have a look at: http://uk3.php.net/manual/
date('%w', $your_date)
which will give you a number from 0 (sunday) to 6 (saturday), so if you get a 0 you can just add 1.
hth
Matt
Have a look at this - maybe install it and run it.
You want to keep all internal representations of the date/time in the ISO8601-format. Then you can use strtotime() and date() in predictable ways to format "pretty" human-readable dates.
You may find that the use of slashes vs dashes in the date input string will cause strtotime() to behave differently. You can test strtotime() on my web site here:
http://www.laprbass.com/RA
One of the key advantages of using strtotime() and date() has to do with date parsing. What if, instead of 08/11/2009 you had 8/11/2009? You wind up having to write programming that could more reasonably be done by the built-in functions of PHP.
Best regards, ~Ray
Business Accounts
Answer for Membership
by: wjaegerPosted on 2009-11-04 at 16:09:27ID: 25745566
Hello
try this Code:
Select allOpen in new window