Menu Riverview Church

DATE_INTERVAL_CREATE_FROM_DATE_STRING

Sets up a DateInterval from the relative parts of the string

SYNTAX

date_interval_create_from_date_string ( string $datetime ) : DateInterval

PARAMETERS

datetime

A date with relative parts. Specifically, the relative formats supported by the parser used for strtotime() and DateTime will be used to construct the DateInterval.

RETURN

Returns a new DateInterval instance.

EXAMPLES

1

1

2

2020-10-20 08:48:08
2020-10-20 08:48:09
2020-10-20 08:49:08
2020-10-20 09:48:08
2020-10-21 08:48:08
2020-10-27 08:48:08
2020-11-20 08:48:08
2021-10-20 08:48:08

PHP