Jump to content

adding a year to mktime


nezbo

Recommended Posts

Hi all

 

I have this code and I want to get the current financial year.

 

i.e. april to april

 

here is my code:

 

$counted = gmmktime(00, 00, 00, 03, 31, 2001);
		$newCounted = gmmktime();
		while ($counted <= $newCounted)
		{
			$counted = $counted + 31536000;
		}
		echo date("H:i:s - d/m/Y", $counted);

 

this should return a date of 0:0:0 - 31/03/2009 but i get a date of 00:00:00 - 29/03/2009

 

I am not to sure what is wrong.

 

Nezbo

 

Link to comment
https://forums.phpfreaks.com/topic/128176-adding-a-year-to-mktime/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.