__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
string
date/time input
string
key name of pattern in config file
days_in_month(int $month, int $year) : int
int
month as a number (1-12)
int
the year, leave empty for current
int
the number of days in the monthdisplay_timezone(string $timezone) : string
string
valid PHP timezone from www.php.net/timezones
string
forge(int $timestamp, string $timezone) : \Fuel\Core\Date
int
UNIX timestamp from current server
string
valid PHP timezone from www.php.net/timezones
format(string $pattern_key, mixed $timezone) : string
string
either a named pattern from date config file or a pattern, defaults to 'local'
mixed
vald timezone, or if true, output the time in local time instead of system time
string
get_timezone() : string
string
get_timezone_abbr(boolean $display_timezone) : string
boolean
string
range_to_array(int | \Fuel\Core\Date $start, int | \Fuel\Core\Date $end, int | string $interval) : array
int
string
Length of the interval in seconds or valid strtotime time difference
array
array of Date objectstime_ago(int $timestamp, int $from_timestamp, string $unit) : string
int
UNIX timestamp from current server
int
UNIX timestamp to compare against. Default to the current time
string
Unit to return the result in
string
Time ago$display_timezone : string
$server_gmt_offset : int
$timezone : string
DAY
HOUR
MINUTE
WEEK