Periods¶
Go forward in time¶
use Innmind\TimeContinuum\{
Clock,
Period,
};
$future = Clock::live()
->now()
->goForward(
Period::day(1)
->and(Period::hour(12)),
);
$future
is now a day and a half ahead of the current time.
Go back in time¶
use Innmind\TimeContinuum\{
Clock,
Period,
};
$past = Clock::live()
->now()
->goBack(
Period::day(1)
->and(Period::hour(12)),
);
$past
is now a day and a half behind of the current time.