Welcome Guest, Not a member yet? Register   Sign In
Dates showing up wrong on 31st of the month.
#4

I have been playing around with the following just in a php section on a page.

PHP Code:
$date = new DateTime('FIRST DAY OF -2 MONTH');
echo 
$date->format('m'); 

and this seems to be working fine but I am now trying to figure out how to format it into my function and keep the versatility.

Doomie
Reply


Messages In This Thread
RE: Dates showing up wrong on 31st of the month. - by doomie22 - 06-01-2017, 01:08 PM



Theme © iAndrew 2016 - Forum software by © MyBB