i want to have a date 6 years from now?
how do i do that?
i want to have a date 6 years from now?
how do i do that?
<?php
$timestamp = strtotime('+6 years');
echo date('Y-m-d H:i:s', $timestamp);
?>
strtotime('+6 years');
you can pass that timestamp into something like strftime(); strtotime
Still laughing about ChaosPandion's comment :)
echo strtotime ("+6 years");
should do the trick.
189302400 is the number of seconds in 6 years.
Get the current timestamp, then add 189302400, and then convert the timestamp to a date string.
Your description isn't very precise, but echo date("Y-m-d", strtotime("+6 years"));
might be what you need ...