vlibDate

vLIB logo

6.12. addInterval()

Function Description
  addInterval (string timestamp , string interval)

Returns a timestamp with the interval added.
Accepted interval values are DAY[S], WEEK[S], MONTH[S], YEAR[S] and CENTURY [CENTURIES].

The returned timestamp is a vlibDate timestamp. For more information on this, please see the IMPORTANT section.

Example

   $futuredate = $date>addInterval($date->now(), '2 CENTURIES 5 YEARS 2 MONTHS 3 DAYS');