Orpheus

DateTime extends DateTime
in package
implements JsonSerializable

Table of Contents

Interfaces

JsonSerializable

Methods

__construct()  : mixed
Date constructor
__toString()  : mixed
asDate()  : Date
Clone as Date
asDateTime()  : DateTime
Clone as DateTime
getDaysTo()  : int
Get days to reach other date
isAfter()  : bool
Test this date is after the other one
jsonSerialize()  : string

Methods

__construct()

Date constructor

public __construct([string|null $date = null ]) : mixed
Parameters
$date : string|null = null

SQL Date

Tags
throws
Exception

__toString()

public __toString() : mixed
Tags
throws
Exception

asDate()

Clone as Date

public asDate() : Date
Tags
throws
Exception
Return values
Date

getDaysTo()

Get days to reach other date

public getDaysTo([DateTime|null $otherDate = null ]) : int
Parameters
$otherDate : DateTime|null = null
Return values
int

isAfter()

Test this date is after the other one

public isAfter(DateTime $otherDatetime) : bool
Parameters
$otherDatetime : DateTime
Return values
bool

jsonSerialize()

public jsonSerialize() : string
Return values
string

							
On this page

Search results