DateTimeField
in package
Table of Contents
- $datetime : mixed
- $cache : mixed
- __construct() : mixed
- __convertToDBFormat() : string
- __convertToUserFormat() : string
- convertTimeZone() : DateTime
- convertToDBFormat() : string
- convertToDBTimeZone() : mixed
- convertToUserFormat() : string
- convertToUserTimeZone() : mixed
- getDBInsertDateTimeValue() : string
- getDBInsertDateValue() : mixed
- Function to set date values compatible to database (YY_MM_DD).
- getDBInsertTimeValue() : string
- Function to set time values compatible to database (GMT).
- getDisplayDate() : string
- This function returns the date in user specified format.
- getDisplayDateTimeValue() : mixed
- getDisplayFullDateTimeValue() : string
- Get full datetime value (with seconds).
- getDisplayTime() : string
- Get display time.
- getFullcalenderDateTimevalue() : mixed
- getFullcalenderTime() : mixed
- sanitizeDate() : string
- Sanitize date.
Properties
$datetime
protected
mixed
$datetime
$cache
private
static mixed
$cache
= []
Methods
__construct()
public
__construct(type $value) : mixed
Parameters
- $value : type
Return values
mixed —__convertToDBFormat()
public
static __convertToDBFormat(string $date, string $format) : string
Parameters
- $date : string
- $format : string
Return values
string —__convertToUserFormat()
public
static __convertToUserFormat(string $date, string $format) : string
Parameters
- $date : string
- $format : string
Return values
string —convertTimeZone()
public
static convertTimeZone(type $time, type $sourceTimeZoneName, type $targetTimeZoneName) : DateTime
Parameters
- $time : type
- $sourceTimeZoneName : type
- $targetTimeZoneName : type
Return values
DateTime —convertToDBFormat()
public
static convertToDBFormat(string $date[, User $user = null ]) : string
Parameters
- $date : string
- $user : User = null
Return values
string —convertToDBTimeZone()
public
static convertToDBTimeZone(string $value[, Users $user = null ][, mixed $formatDate = true ]) : mixed
Parameters
- $value : string
- $user : Users = null
- $formatDate : mixed = true
Return values
mixed —convertToUserFormat()
public
static convertToUserFormat(string $date) : string
Parameters
- $date : string
Return values
string —convertToUserTimeZone()
public
static convertToUserTimeZone(string $value[, Users $user = null ]) : mixed
Parameters
- $value : string
- $user : Users = null
Return values
mixed —getDBInsertDateTimeValue()
public
getDBInsertDateTimeValue() : string
Return values
string —getDBInsertDateValue()
Function to set date values compatible to database (YY_MM_DD).
public
getDBInsertDateValue() : mixed
Tags
Return values
mixed —getDBInsertTimeValue()
Function to set time values compatible to database (GMT).
public
getDBInsertTimeValue([bool $convertTimeZone = true ]) : string
Parameters
- $convertTimeZone : bool = true
Return values
string —getDisplayDate()
This function returns the date in user specified format.
public
getDisplayDate([User|null $user = null ][, bool $convertTimeZone = true ]) : string
Parameters
- $user : User|null = null
- $convertTimeZone : bool = true
Return values
string —getDisplayDateTimeValue()
public
getDisplayDateTimeValue([mixed $user = null ]) : mixed
Parameters
- $user : mixed = null
Return values
mixed —getDisplayFullDateTimeValue()
Get full datetime value (with seconds).
public
getDisplayFullDateTimeValue([User|null $user = null ]) : string
Parameters
- $user : User|null = null
Return values
string —getDisplayTime()
Get display time.
public
getDisplayTime([User|null $user = null ][, bool $convertTimeZone = true ][, bool $fullTime = false ]) : string
Parameters
- $user : User|null = null
- $convertTimeZone : bool = true
- $fullTime : bool = false
-
(with seconds)
Return values
string —getFullcalenderDateTimevalue()
public
getFullcalenderDateTimevalue([mixed $user = null ]) : mixed
Parameters
- $user : mixed = null
Return values
mixed —getFullcalenderTime()
public
getFullcalenderTime([mixed $user = null ]) : mixed
Parameters
- $user : mixed = null
Return values
mixed —sanitizeDate()
Sanitize date.
private
static sanitizeDate(string $value, User|null $user) : string
Parameters
- $value : string
- $user : User|null
Return values
string —$value