Class

eZ\Publish\Core\FieldType\Date\Value

class Value extends Value

Value for Date field type.

Properties

DateTime $date Date content.
string $stringFormat Date format to be used by {@link __toString()}.

Methods

string __toString()

__construct(DateTime $dateTime = null)

Construct a new Value object and initialize with $dateTime.

static Value fromString(string $dateString)

Creates a Value from the given $dateString.

static Value fromTimestamp(int $timestamp)

Creates a Value from the given $timestamp.

Details

at line 88
public string __toString()

Return Value

string

See also

\eZ\Publish\Core\FieldType\Value

at line 40
public __construct(DateTime $dateTime = null)

Construct a new Value object and initialize with $dateTime.

Parameters

DateTime $dateTime Date as a DateTime object

at line 58
static public Value fromString(string $dateString)

Creates a Value from the given $dateString.

Parameters

string $dateString

Return Value

Value

Exceptions

InvalidArgumentException

at line 76
static public Value fromTimestamp(int $timestamp)

Creates a Value from the given $timestamp.

Parameters

int $timestamp

Return Value

Value

Exceptions

InvalidArgumentException