date - PHP: Adding years to a timestamp -


in php given utc timestamp add n number of years. should take consideration leap years.

thank you.

$newtimestamp = strtotime('+2 years', $timestamp); 

replace "+2 years" required.

ref: http://php.net/manual/en/function.strtotime.php


Comments

Popular posts from this blog

python - Why doesn't list have safe "get" method like dictionary? -

razor - Is this a bug in WebMatrix PageData? -

sql server - Stored procedure -