Documentation

DateTime extends DateTime
in package
implements Stringable, IMarshallable

FinalYes
Tags
author

Ramone Burrell ramone@ramoneburrell.com

since

Version 0.1.0

Table of Contents

Interfaces

Stringable
IMarshallable

Constants

DEFAULT_FORMAT  = 'Y-m-d H:i'

Methods

__construct()  : mixed
__toString()  : string
add()  : DateTime
{@inheritdoc}
beforeMidnightTomorrow()  : mixed
endOfMonth()  : mixed
endOfWeek()  : mixed
getCurrentTimestamp()  : mixed
getDate()  : string
getDateTime()  : string
getDayName()  : string
Gets the full name of the day for this Wolfgang\Date\DateTime instance
getElapsedTime()  : string
getModelTimezone()  : Timezone
getTime()  : string
getUTCAndLocalDatetimes()  : mixed
marshall()  : mixed
setTimezone()  : DateTime
startOfMonth()  : mixed
startOfWeek()  : mixed
strDateTime()  : DateTime
Gets an instance of the class Wolfgang\Date\DateTime by a provided str time.
todayMidnight()  : mixed
tomorrow()  : mixed

Constants

Methods

__construct()

public __construct([string $time = "now" ][, DateTimeZone $timezone = null ]) : mixed
Parameters
$time : string = "now"
$timezone : DateTimeZone = null

add()

{@inheritdoc}

public add(DateInterval|string $interval) : DateTime
Parameters
$interval : DateInterval|string
Tags
see
DateTime::add()
Return values
DateTime

getCurrentTimestamp()

public static getCurrentTimestamp() : mixed

getDate()

public getDate([mixed $format = 'Y-m-d' ]) : string
Parameters
$format : mixed = 'Y-m-d'
Return values
string

getDateTime()

public getDateTime([mixed $format = 'Y-m-d H:i:s' ]) : string
Parameters
$format : mixed = 'Y-m-d H:i:s'
Return values
string

getDayName()

Gets the full name of the day for this Wolfgang\Date\DateTime instance

public getDayName() : string
Return values
string

getTime()

public getTime([mixed $format = 'H:i:s' ]) : string
Parameters
$format : mixed = 'H:i:s'
Return values
string

getUTCAndLocalDatetimes()

public static getUTCAndLocalDatetimes(string $datetime, DateTime &$utc_datetime, DateTime &$local_datetime, string $timezone_label[, bool $is_utc = FALSE ]) : mixed
Parameters
$datetime : string
$utc_datetime : DateTime
$local_datetime : DateTime
$timezone_label : string
$is_utc : bool = FALSE

strDateTime()

Gets an instance of the class Wolfgang\Date\DateTime by a provided str time.

public static strDateTime(string $str_datetime[, string $timezone = NULL ]) : DateTime
Parameters
$str_datetime : string
$timezone : string = NULL
Return values
DateTime

        
On this page

Search results