Calculate the moment when someone has lived for 10^9 seconds.
A gigasecond is 10^9 (1,000,000,000) seconds.
Calculate the moment when someone has lived for 10^9 seconds.
A gigasecond is 10^9 (1,000,000,000) seconds.
Code:
<?php
function from(DateTime $birthday)
{
$birthday = clone $birthday;
$gigaSecond = new DateInterval(sprintf('PT%dS', 1e9));
$birthday->add($gigaSecond);
return $birthday;
}