category | OSS |
---|---|
package | OSS_Date |
copyright | Copyright (c) 2007 - 2012, Open Source Solutions Limited, Dublin, Ireland |
license | New BSD License |
ISOdate(string $date) : string
The Input can be in "yyyy-mm-dd" or "dd/mm/yyyy" format, where the year can be two or four characters, and both the month and day can be one or two characters. It also takes and formats the time part.
string
string
dateDiffDays(string $date1, string $date2) : int
string
default null if null then it will take the current date
string
default null if null then it will take the current date
int
dateDiffMonths(string $date1, string $date2) : int
string
default null if null then it will take the current date
string
default null if null then it will take the current date
int
dateDiffYears(string $date1, string $date2) : int
string
default null if null then it will take the current date
string
default null if null then it will take the current date
int
secondsToHMS(int $seconds) : array
Returns with an associative array having the keys 'hours', 'minutes' and 'seconds'.
int
array
secondsToTimeString(int $seconds) : string
int
string