DateInterval::createFromDateString()

It sets up a DateInterval from the relative parts of the string.
Example

<?php
echo “<pre>”;
$interval = DateInterval::createFromDateString(‘1 month’);
print_r($interval);
?>

Output

DateInterval Object
(
[y] => 0
[m] => 1
[d] => 0
[h] => 0
[i] => 0
[s] => 0
[invert] => 0
[days] => 0
)