A PHP representation of the CQL date type.

Implements

Methods

__construct

( int $seconds = null )

Creates a new Cassandra\Date object

Parameters:
Name Type Details
$seconds int

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

Cassandra\Type

type

( )

The type of this date.

Returns:
Type Details
Cassandra\Type
int

seconds

( )
Returns:
Type Details
int

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

DateTime

toDateTime

( )

Converts current date to PHP DateTime.

Returns:
Type Details
DateTime

PHP representation

string

__toString

( )
Returns:
Type Details
string

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