Menu Riverview Church

DATE_ADD

Adds an amount of days, months, years, hours, minutes and seconds to a DateTime object

SYNTAX

date_add ( DateTime $object , DateInterval $interval ) : DateTime

PARAMETERS

object

A DateTime object returned by date_create(). The function modifies this object.

interval

A DateInterval object

RETURN

Returns the DateTime object for method chaining or FALSE on failure.

EXAMPLES

2002-02-02
2002-02-02

PHP