PHP Class Cassandra\Date

Inheritance: implements cassandra\Value
Exibir arquivo Open project: datastax/php-driver

Public Methods

Method Description
__construct ( integer $seconds = null ) Creates a new Date object
__toString ( ) : string
seconds ( ) : integer
toDateTime ( ) : DateTime Converts current date to PHP DateTime.
type ( ) : cassandra\Type The type of this date.

Method Details

__construct() public method

Creates a new Date object
public __construct ( integer $seconds = null )
$seconds integer Absolute seconds from epoch (1970, 1, 1), can be negative, defaults to current time

__toString() public method

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

seconds() public method

public seconds ( ) : integer
return integer Absolute seconds from epoch (1970, 1, 1), can be negative

toDateTime() public method

Converts current date to PHP DateTime.
public toDateTime ( ) : DateTime
return DateTime PHP representation

type() public method

The type of this date.
public type ( ) : cassandra\Type
return cassandra\Type