Méthode |
Description |
|
accuracy ( string $v = false ) : string |
Return the accuracy date format |
|
beginningOfWeek ( string $date, string $first_day = 'monday' ) : integer |
Returns number of days to start of this week. |
|
compareDate ( ) |
TO DO |
|
compareDatetime ( ) |
TO DO |
|
daysToDate ( integer $date ) : float |
Return the days to a expiration date from now. Return the days to up ($date > now) or days expired ($date < now). |
|
daysToWeekStart ( object $date, string $first_day = 'monday' ) : integer |
Returns number of days to start of this week. |
|
elapsed ( $timestamp, $to = false, $w = 's' ) |
TODO proto |
|
elapsedString ( integer $timestamp, boolean $hide_empty = true, integer $to, string $separator = ', ' ) : string |
This method is similar to WordPress human_time_diff(), with the different that every amount is display. |
|
elapsed_string ( $timestamp, $hide_empty = true, $to, $separator = ' ' ) |
|
|
expirationDate ( string $date, integer $duration, string $duration_type ) : integer |
Return a timestamp as sum from $date and $duration/$duration_type |
|
format ( string | integer $date, string $to = self::DATETIME_FORMAT_PHP ) : string |
Format a date time in your custom own format. The source format is auto-detect. |
|
human ( string | integer $date, string $format = false ) : string |
Return an more readable human date format. |
|
isExpired ( integer $exipration ) : boolean |
Return TRUE if $expiration date is past. |
|
isInRangeDatetime ( string | integer $date_start, string | integer $date_expire, string $format = 'YmdHis', boolean $timestamp = false ) : boolean |
Return TRUE if now (today) is between from two date. |
|
mySQLDate ( string | integer $date ) : string |
Return a date in MySQL format YYYY-MM-DD. |
|
mySQLDateTime ( string | integer $datetime ) : string |
Return a date and time in MySQL format YYYY-MM-DD HH:MM:SS. |
|
stripSecondsFromTime ( string $time ) : string |
Strip seconds from a date string (with time) |
|
timeInRange ( integer $start, integer $expiry ) : boolean |
Return TRUE if now time() is between $start and $expry. |
|
timeNewLine ( string $datetime ) : string |
Put a new line before time. |
|