A PHP representation of the CQL date type.

Implements

Methods

__construct

( int $seconds )

Creates a new Dse\Date object

Parameters:
Name Type Details
$seconds int

Absolute seconds from epoch (1970, 1, 1), can be negative, defaults to current time.

Dse\Type

type

( )

The type of this date.

Returns:
Type Details
Dse\Type
int

seconds

( )
Returns:
Type Details
int

Absolute seconds from epoch (1970, 1, 1), can be negative

DateTime

toDateTime

( Dse\Time $time )

Converts current date to PHP DateTime.

Parameters:
Name Type Details
$time Dse\Time

An optional Dse\Time object that is added to the DateTime object.

Returns:
Type Details
DateTime

PHP representation

string

__toString

( )
Returns:
Type Details
string

this date in string format: Dse\Date(seconds=$seconds)

static DateTime

fromDateTime

( DateTime $datetime )

Creates a new Dse\Date object from a DateTime object.

Static
This method is static
Parameters:
Name Type Details
$datetime DateTime

A DateTime object to convert.

Returns:
Type Details
DateTime

PHP representation