Can someone show me a simple way to calculate dates? What I'm trying to do is get a future or past date based on today's date. Example, if I want to know what the date is 3 weeks from now.
thanks!
Use PHP's built-in functions such as strtotime in conjunction with date().
Lots of examples to be found in the PHP online manual there.
Code:
echo '3 Weeks from now: '. date('Y-m-d', strtotime('+3 weeks')) ."\n";
----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.