Zend Framework
1.12
|
Public Member Functions | |
setTimezone ($zone=null) | |
Sets a new timezone for calculation of $this object's gmt offset. | |
getTimezone () | |
Return the timezone of $this object. | |
getGmtOffset () | |
Return the offset to GMT of $this object's timezone. | |
Protected Member Functions | |
setUnixTimestamp ($timestamp=null) | |
Set this object to have a new UNIX timestamp. | |
getUnixTimestamp () | |
Returns this object's UNIX timestamp A timestamp greater then the integer range will be returned as string This function does not return the timestamp as object. | |
_getTime ($sync=null) | |
Internal function. | |
mktime ($hour, $minute, $second, $month, $day, $year, $gmt=false) | |
Internal mktime function used by Zend_Date. | |
date ($format, $timestamp=null, $gmt=false) | |
Internal mktime function used by Zend_Date for handling 64bit timestamps. | |
getDateParts ($timestamp=null, $fast=null) | |
Internal getDateParts function for handling 64bit timestamps, similar to: http://www.php.net/getdate. | |
weekNumber ($year, $month, $day) | |
Internal getWeekNumber function for handling 64bit timestamps. | |
calcSun ($location, $horizon, $rise=false) | |
Calculates the sunrise or sunset based on a location. | |
Static Protected Member Functions | |
static | isYearLeapYear ($year) |
Returns true, if given $year is a leap year. | |
static | dayOfWeek ($year, $month, $day) |
Returns the day of week for a Gregorian calendar date. | |
static | _getTagSupportForCache () |
Internal method to check if the given cache supports tags. | |
Protected Attributes | |
$_dst = true | |
Static Protected Attributes | |
static | $_cache = null |
static | $_cacheTags = false |
static | $_defaultOffset = 0 |
|
staticprotected |
Internal method to check if the given cache supports tags.
Zend_Cache | $cache |
|
protected |
Internal function.
Returns time(). This method exists to allow unit tests to work-around methods that might otherwise be hard-coded to use time(). For example, this makes it possible to test isYesterday() in Date.php.
integer | $sync | OPTIONAL time syncronisation value |
|
protected |
Calculates the sunrise or sunset based on a location.
array | $location | Location for calculation MUST include 'latitude', 'longitude', 'horizon' |
bool | $horizon | true: sunrise; false: sunset |
|
protected |
Internal mktime function used by Zend_Date for handling 64bit timestamps.
Returns a formatted date for a given timestamp.
string | $format | format for output |
mixed | $timestamp | |
boolean | $gmt | OPTIONAL true = other arguments are for UTC time, false = arguments are for local time/date |
|
staticprotected |
Returns the day of week for a Gregorian calendar date.
0 = sunday, 6 = saturday
integer | $year | |
integer | $month | |
integer | $day |
|
protected |
Internal getDateParts function for handling 64bit timestamps, similar to: http://www.php.net/getdate.
Returns an array of date parts for $timestamp, relative to 1970/01/01 00:00:00 GMT/UTC.
$fast specifies ALL date parts should be returned (slower) Default is false, and excludes $dayofweek, weekday, month and timestamp from parts returned.
mixed | $timestamp | |
boolean | $fast | OPTIONAL defaults to fast (false), resulting in fewer date parts |
getGmtOffset | ( | ) |
Return the offset to GMT of $this object's timezone.
The offset to GMT is initially set when the object is instantiated using the currently, in effect, default timezone for PHP functions.
getTimezone | ( | ) |
Return the timezone of $this object.
The timezone is initially set when the object is instantiated.
|
protected |
Returns this object's UNIX timestamp A timestamp greater then the integer range will be returned as string This function does not return the timestamp as object.
Use copy() instead.
|
staticprotected |
Returns true, if given $year is a leap year.
integer | $year |
|
protected |
Internal mktime function used by Zend_Date.
The timestamp returned by mktime() can exceed the precision of traditional UNIX timestamps, by allowing PHP to auto-convert to using a float value.
Returns a timestamp relative to 1970/01/01 00:00:00 GMT/UTC. DST (Summer/Winter) is depriciated since php 5.1.0. Year has to be 4 digits otherwise it would be recognised as year 70 AD instead of 1970 AD as expected !!
integer | $hour | |
integer | $minute | |
integer | $second | |
integer | $month | |
integer | $day | |
integer | $year | |
boolean | $gmt | OPTIONAL true = other arguments are for UTC time, false = arguments are for local time/date |
setTimezone | ( | $zone = null | ) |
Sets a new timezone for calculation of $this object's gmt offset.
For a list of supported timezones look here: http://php.net/timezones If no timezone can be detected or the given timezone is wrong UTC will be set.
string | $zone | OPTIONAL timezone for date calculation; defaults to date_default_timezone_get() |
Zend_Date_Exception |
|
protected |
Set this object to have a new UNIX timestamp.
string | integer | $timestamp | OPTIONAL timestamp; defaults to local time using time() |
Zend_Date_Exception |
|
protected |
Internal getWeekNumber function for handling 64bit timestamps.
Returns the ISO 8601 week number of a given date
integer | $year | |
integer | $month | |
integer | $day |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
protected |