EmptyDateTime

Extends \DateTime

EmptyDateTime

The purpose of this class is to represent a DateTime with support of an empty date 1000-01-01 00:00:00

category

System

package

Shared

extends

DateTime

Methods

__construct

__construct(string $time = '1000-01-01 00:00:00', \DateTimeZone $timeZone = null) 

Arguments

$time

string

A date/time string. NULL will be represented as 1000-01-01 00:00:00 instead of the current time like in DateTime.

$timeZone

\DateTimeZone

A DateTimeZone object representing the timezone of $time. If $timezone is omitted, the current timezone will be used.

Formats a date by a given pattern and ensures, that dates that represent empty data are formatted to '1000-01-01 00:00:00'

format(string $format) : string

Arguments

$format

string

Response

string

Properties

isNullDate

isNullDate : boolean
var

Type(s)

boolean