Zend Framework
LICENSE
This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to license@zend.com so we can send you a copy immediately.
$_cache = 'null'
$_defaultOffset = '0'
$_dst = 'true'
$_monthTable = 'array'
Table of Monthdays
$_offset = '0'
$_syncronised = '0'
$_timezone = 'UTC'
active timezone
$_unixTimestamp = ''
UNIX Timestamp
$_yearTable = 'array'
Table of Years
_getTime(
integer $sync
=
null
)
:
integer
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.
_range(
float $a, float $b
)
:
Internal _range function Sets the value $a to be in the range of [0, $b]
calcSun(
array $location, bool $horizon, $rise
=
false
)
:
mixed
Calculates the sunrise or sunset based on a location
date(
string $format, mixed $timestamp
=
null, boolean $gmt
=
false
)
:
string
Internal mktime function used by Zend_Date for handling 64bit timestamps.
Returns a formatted date for a given timestamp.
dayOfWeek(
integer $year, integer $month, integer $day
)
:
integer
Returns the day of week for a Gregorian calendar date.
0 = sunday, 6 = saturday
getDateParts(
mixed $timestamp
=
null, boolean $fast
=
null
)
:
array
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.
getGmtOffset(
)
:
integer
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(
)
:
string
Return the timezone of $this object.
The timezone is initially set when the object is instantiated.
getUnixTimestamp(
)
:
integer|string
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.
isYearLeapYear(
integer $year
)
:
boolean
Returns true, if given $year is a leap year.
mktime(
integer $hour, integer $minute, integer $second, integer $month, integer $day, integer $year, boolean $gmt
=
false
)
:
integer|float
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 !!
setTimezone(
string $zone
=
null
)
:
Zend_Date_DateObject
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.
setUnixTimestamp(
string|integer $timestamp
=
null
)
:
string|integer
Set this object to have a new UNIX timestamp.
weekNumber(
integer $year, integer $month, integer $day
)
:
integer
Internal getWeekNumber function for handling 64bit timestamps
Returns the ISO 8601 week number of a given date