phpDocumentor

EmptyDateTime extends DateTime
in package

EmptyDateTime

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

Tags
category

System

extends

DateTime

Table of Contents

$isNullDate  : bool
__construct()  : mixed
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'

Properties

Methods

__construct()

public __construct([string $time = '1000-01-01 00:00:00' ][, DateTimeZone $timeZone = null ]) : mixed
Parameters
$time : string = '1000-01-01 00:00:00'

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 = null

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

Return values
mixed

format()

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

public format(string $format) : string
Parameters
$format : string
Return values
string

Search results