ElementDate
extends ElementString
in package
Class ElementDate
Table of Contents
Properties
Methods
- __construct() : mixed
- __toString() : string
- contains() : bool
- equals() : bool
- getContent() : mixed
- init() : mixed
- parse() : bool|ElementDate
- setFormat() : mixed
Properties
$document
protected
Document|null
$document
$format
protected
string
$format
= 'c'
$formats
protected
static array<int, string>
$formats
= [4 => 'Y', 6 => 'Ym', 8 => 'Ymd', 10 => 'YmdH', 12 => 'YmdHi', 14 => 'YmdHis', 15 => 'YmdHise', 17 => 'YmdHisO', 18 => 'YmdHisO', 19 => 'YmdHisO']
$value
protected
DateTime
$value
Methods
__construct()
public
__construct(mixed $value) : mixed
Parameters
- $value : mixed
__toString()
public
__toString() : string
Return values
stringcontains()
public
contains(mixed $value) : bool
Parameters
- $value : mixed
Return values
boolequals()
public
equals(mixed $value) : bool
Parameters
- $value : mixed
Return values
boolgetContent()
public
getContent() : mixed
init()
public
init() : mixed
parse()
public
static parse(string $content[, Document|null $document = null ][, int &$offset = 0 ]) : bool|ElementDate
Parameters
- $content : string
- $document : Document|null = null
- $offset : int = 0
Return values
bool|ElementDatesetFormat()
public
setFormat(string $format) : mixed
Parameters
- $format : string