PHP Class Prado\Util\TDateTimeStamp

TDateTimeStamp Class is a wrapper to DateTime: http://php.net/manual/book.datetime.php Prado implemented this class before php started shipping the DateTime extension. This class is deprecated and left here only for compatibility for legacy code. Please note that this class doesn't support automatic conversion from gregorian to julian dates anymore.
Deprecation: since 3.2.1
Since: 3.0.4
Author: Fabio Bas ctrlaltca[AT]gmail[DOT]com
Afficher le fichier Open project: pradosoft/prado Class Usage Examples

Protected Properties

Свойство Type Description
$_month_leaf
$_month_normal

Méthodes publiques

Méthode Description
formatDate ( $fmt, $ts = false, $is_gmt = false ) : string
get4DigitYear ( $y )
getDate ( $d = false, $fast = false ) : array
getDayofWeek ( $year, $month, $day ) Returns the day of the week (0=Sunday, 1=Monday, .
getGMTDiff ( $ts = false ) : integer
getTimeStamp ( $hr, $min, $sec, $mon = false, $day = false, $year = false, $is_gmt = false ) : integer | float
isLeapYear ( $year ) : boolean Checks for leap year, returns true if it is. No 2-digit year check. Also handles julian calendar correctly.
isValidDate ( $y, $m, $d ) : boolean
parseDate ( $txt = false ) : array

Méthodes protégées

Méthode Description
digitCheck ( $y ) : integer Fix 2-digit years. Works for any century.

Method Details

digitCheck() protected méthode

Assumes that if 2-digit is more than 30 years in future, then previous century.
protected digitCheck ( $y ) : integer
Résultat integer change two digit year into multiple digits

formatDate() public méthode

public formatDate ( $fmt, $ts = false, $is_gmt = false ) : string
Résultat string formatted date based on timestamp $d

get4DigitYear() public méthode

public get4DigitYear ( $y )

getDate() public méthode

public getDate ( $d = false, $fast = false ) : array
Résultat array an array with date info.

getDayofWeek() public méthode

. 6=Saturday)
public getDayofWeek ( $year, $month, $day )

getGMTDiff() public méthode

public getGMTDiff ( $ts = false ) : integer
Résultat integer get local time zone offset from GMT

getTimeStamp() public méthode

public getTimeStamp ( $hr, $min, $sec, $mon = false, $day = false, $year = false, $is_gmt = false ) : integer | float
Résultat integer | float a timestamp given a local time

isLeapYear() public méthode

Checks for leap year, returns true if it is. No 2-digit year check. Also handles julian calendar correctly.
public isLeapYear ( $year ) : boolean
Résultat boolean true if is leap year

isValidDate() public méthode

public isValidDate ( $y, $m, $d ) : boolean
Résultat boolean true if valid date, semantic check only.

parseDate() public méthode

public parseDate ( $txt = false ) : array
Résultat array an array with date info.

Property Details

$_month_leaf protected_oe static_oe property

protected static $_month_leaf

$_month_normal protected_oe static_oe property

protected static $_month_normal