Interprets a ISO8601 duration value relative to a given timestamp.
public static parseDuration ( string $duration, integer | null $timestamp = null ) : integer | null | ||
$duration | string | The duration, as a string. |
$timestamp | integer | null | The unix timestamp we should apply the duration to. Optional, default to the current time. |
return | integer | null | The new timestamp, after the duration is applied. |