Menu Riverview Church

DATE_SUB

Subtracts an amount of days, months, years, hours, minutes and seconds from a DateTime object

SYNTAX

date_sub ( 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

OBJECT INTERVAL

2019-09-15 11:09:24

RETURN

2019-09-15 11:09:24

PHP