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

c# - How to set Z index when using WPF DrawingContext? -

razor - Is this a bug in WebMatrix PageData? -

android - layout with fragment and framelayout replaced by another fragment and framelayout -