__construct()
__toString()
_init()
create_from_string()
days_in_month()
display_timezone()
forge()
format()
get_timestamp()
get_timezone()
get_timezone_abbr()
range_to_array()
set_timezone()
time()
time_ago()
$display_timezone
$server_gmt_offset
$timestamp
$timezone
DAY
HOUR
MINUTE
WEEK
Date Class
DateTime replacement that supports internationalization and does correction to GMT when your webserver isn't configured correctly.
__construct($timestamp, $timezone)
__toString() : string
string_init()
create_from_string(string $input, string $pattern_key) : \Fuel\Core\Date
stringdate/time input
stringkey name of pattern in config file
days_in_month(int $month, int $year) : int
intmonth as a number (1-12)
intthe year, leave empty for current
intthe number of days in the monthdisplay_timezone(string $timezone) : string
stringvalid PHP timezone from www.php.net/timezones
stringforge(int $timestamp, string $timezone) : \Fuel\Core\Date
intUNIX timestamp from current server
stringvalid PHP timezone from www.php.net/timezones
format(string $pattern_key, mixed $timezone) : string
stringeither a named pattern from date config file or a pattern, defaults to 'local'
mixedvald timezone, or if true, output the time in local time instead of system time
stringget_timezone() : string
stringget_timezone_abbr(boolean $display_timezone) : string
boolean
stringrange_to_array(int | \Fuel\Core\Date $start, int | \Fuel\Core\Date $end, int | string $interval) : array
intstringLength of the interval in seconds or valid strtotime time difference
arrayarray of Date objectstime_ago(int $timestamp, int $from_timestamp, string $unit) : string
intUNIX timestamp from current server
intUNIX timestamp to compare against. Default to the current time
stringUnit to return the result in
stringTime ago$display_timezone : string
$server_gmt_offset : int
$timezone : string
DAY
HOUR
MINUTE
WEEK