Class EmptyDateTime

EmptyDateTime

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

DateTime implements DateTimeInterface
EmptyDateTime
Package: Shared
Category: System
Extends: DateTime
Located at Shared/EmptyDateTime.inc.php

Methods summary

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

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

Methods inherited from DateTime

__set_state(), __wakeup(), add(), createFromFormat(), diff(), getLastErrors(), getOffset(), getTimestamp(), getTimezone(), modify(), setDate(), setISODate(), setTime(), setTimestamp(), setTimezone(), sub()

Constants summary

Constants inherited from DateTime

ATOM, COOKIE, ISO8601, RFC1036, RFC1123, RFC2822, RFC3339, RFC3339_EXTENDED, RFC7231, RFC822, RFC850, RSS, W3C

Properties summary

protected $isNullDate : boolean
false