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.
DAY = 'dd'
Details DAY_SHORT = 'd'
Details DAY_SUFFIX = 'SS'
Details DAY_OF_YEAR = 'D'
Details WEEKDAY = 'EEEE'
Details WEEKDAY_SHORT = 'EEE'
Details WEEKDAY_NARROW = 'E'
Details WEEKDAY_NAME = 'EE'
Details WEEKDAY_8601 = 'eee'
Details WEEKDAY_DIGIT = 'e'
Details WEEK = 'ww'
Details MONTH = 'MM'
Details MONTH_SHORT = 'M'
Details MONTH_DAYS = 'ddd'
Details MONTH_NAME = 'MMMM'
Details MONTH_NAME_SHORT = 'MMM'
Details MONTH_NAME_NARROW = 'MMMMM'
Details YEAR = 'y'
Details YEAR_SHORT = 'yy'
Details YEAR_8601 = 'Y'
Details YEAR_SHORT_8601 = 'YY'
Details LEAPYEAR = 'l'
Details MERIDIEM = 'a'
Details SWATCH = 'B'
Details HOUR = 'HH'
Details HOUR_SHORT = 'H'
Details HOUR_AM = 'hh'
Details HOUR_SHORT_AM = 'h'
Details MINUTE = 'mm'
Details MINUTE_SHORT = 'm'
Details SECOND = 'ss'
Details SECOND_SHORT = 's'
Details MILLISECOND = 'S'
Details TIMEZONE_NAME = 'zzzz'
Details DAYLIGHT = 'I'
Details GMT_DIFF = 'Z'
Details GMT_DIFF_SEP = 'ZZZZ'
Details TIMEZONE = 'z'
Details TIMEZONE_SECS = 'X'
Details ISO_8601 = 'c'
Details RFC_2822 = 'r'
Details TIMESTAMP = 'U'
Details ERA = 'G'
Details ERA_NAME = 'GGGG'
Details ERA_NARROW = 'GGGGG'
Details DATES = 'F'
Details DATE_FULL = 'FFFFF'
Details DATE_LONG = 'FFFF'
Details DATE_MEDIUM = 'FFF'
Details DATE_SHORT = 'FF'
Details TIMES = 'WW'
Details TIME_FULL = 'TTTTT'
Details TIME_LONG = 'TTTT'
Details TIME_MEDIUM = 'TTT'
Details TIME_SHORT = 'TT'
Details DATETIME = 'K'
Details DATETIME_FULL = 'KKKKK'
Details DATETIME_LONG = 'KKKK'
Details DATETIME_MEDIUM = 'KKK'
Details DATETIME_SHORT = 'KK'
Details ATOM = 'OOO'
Details COOKIE = 'CCC'
Details RFC_822 = 'R'
Details RFC_850 = 'RR'
Details RFC_1036 = 'RRR'
Details RFC_1123 = 'RRRR'
Details RFC_3339 = 'RRRRR'
Details RSS = 'SSS'
Details W3C = 'WWW'
Details $_fractional = '0'
Details $_locale = 'null'
Details $_options = 'array'
Details $_precision = '3'
Details__construct(
string|integer|Zend_Date|array $date
=
null, string $part
=
null, string|Zend_Locale $locale
=
null
)
:
Zend_DateGenerates the standard date object, could be a unix timestamp, localized date, string, integer, array and so on. Also parts of dates or time are supported Always set the default timezone: http://php.net/date_default_timezone_set For example, in your bootstrap: date_default_timezone_set('America/Los_Angeles'); For detailed instructions please look in the docu.
Details__toString(
)
:
stringReturns a string representation of the date which is equal with the timestamp
Details_assign(
string $calc, string|integer $date, string|integer $comp
=
0, boolean|integer $dst
=
false
)
:
integer|string|Zend_DateCalculates the date or object
Details_calcdetail(
string $calc, string|integer|array|Zend_Date $date, $type, string|Zend_Locale $locale
)
:
integer|stringCalculate date details
Details_calculate(
string $calc, string|integer|array|Zend_Date $date, string $part, string|Zend_Locale $locale
)
:
integer|string|Zend_DateCalculates the date or object
Details_calcvalue(
string $calc, string|integer|Zend_Date $value, $type, $parameter, string|Zend_Locale $locale
)
:
integer|Zend_DateInternal calculation, returns the requested date type
Details_checkLocation(
$location $location
)
:
$horizonCheck if location is supported
Details_date(
string $calc, string|integer|array|Zend_Date $date, string $format, string|Zend_Locale $locale
)
:
integer|Zend_DateReturns the calculated date
Details_day(
$calc $calc, $day $day, $locale $locale
)
:
Zend_Date|integerReturns the calculated day
Details_getDigitFromName(
string $name
)
:
integerReturn digit from standard names (english) Faster implementation than locale aware searching
Details_getLocalizedToken(
string $token, string $locale
)
:
stringReturns the ISO Token for all localized constants
Details_month(
string $calc, string|integer|array|Zend_Date $month, string|Zend_Locale $locale
)
:
integer|Zend_DateReturns the calculated month
Details_parseIsoToDate(
string $token, string $locale
)
:
stringInternal parsing method
Details_time(
string $calc, string|integer|array|Zend_Date $time, string $format, string|Zend_Locale $locale
)
:
integer|Zend_DateReturns the calculated time
Details_timestamp(
string $calc, string|integer|array|Zend_Date $stamp
)
:
Zend_Date|integerReturns the calculated timestamp HINT: timestamps are always GMT
Details_toComment(
string $token
)
:
stringPrivate function to make a comment of a token
Details_toToken(
string $part, string $locale
)
:
stringInternal method to apply tokens
Details_weekday(
$calc $calc, $weekday $weekday, $locale $locale
)
:
Zend_Date|integerReturns the calculated weekday
Detailsadd(
string|integer|array|Zend_Date $date, string $part
=
self, string|Zend_Locale $locale
=
null
)
:
Zend_DateAdds a date or datepart to the existing date, by extracting $part from $date, and modifying this object by adding that part. The $part is then extracted from this object and returned as an integer or numeric string (for large values, or $part's corresponding to pre-defined formatted date strings).
This could be for example a ISO 8601 date, the hour the monthname or only the minute. There are about 50 different supported date parts. For a complete list of supported datepart values look into the docu.
DetailsaddArpa(
string|integer|Zend_Date $date, string|Zend_Locale $locale
=
null
)
:
Zend_DateAdds a RFC 822 date to the date object.
ARPA messages are used in emails or HTTP Headers. Only RFC 822 compilant date strings are accepted. For example: Sat, 14 Feb 09 00:31:30 +0100 Returned is the new date object
DetailsaddDate(
string|integer|array|Zend_Date $date, string $format
=
null, string|Zend_Locale $locale
=
null
)
:
Zend_DateAdds a date to the existing date object. Format defines how to parse the date string.
If only parts are given the other parts are set to 0. If no format is given, the standardformat of this locale is used. For example: MM.dd.YYYY -> 10 -> +10 months
DetailsaddDay(
$day, string|Zend_Locale $locale
=
null
)
:
Zend_DateAdds days to the existing date object.
The day can be a number or a string. Adding days lower then 0 or greater than the number of this months days will result in adding or subtracting the relevant month. If a localized dayname is given it will be parsed with the default locale or the optional set locale.
DetailsaddDayOfYear(
string|integer|array|Zend_Date $day, string|Zend_Locale $locale
=
null
)
:
Zend_DateAdds a day of year to the existing date object.
The day of year is always a number. Returned is the new date object Example: addDayOfYear(10); will add 10 days to the existing date object.
DetailsaddHour(
string|integer|array|Zend_Date $hour, string|Zend_Locale $locale
=
null
)
:
Zend_DateAdds hours to the existing date object.
The hour is always a number. Returned is the new date object Example: 04.May.1993 13:07:25 -> addHour(12); -> 05.May.1993 01:07:25
DetailsaddIso(
string|integer|Zend_Date $date, string|Zend_Locale $locale
=
null
)
:
Zend_DateAdds a ISO date to the date object. Not given parts are set to default.
Only supported ISO 8601 formats are accepted. For example: 050901 -> + 01.Sept.2005 00:00:00, 10:00:00 -> +10h Returned is the new date object
DetailsaddMilliSecond(
integer|Zend_Date $milli
=
null, integer $precision
=
null
)
:
Zend_DateAdds milliseconds to the date object
DetailsaddMinute(
string|integer|array|Zend_Date $minute, string|Zend_Locale $locale
=
null
)
:
Zend_DateAdds minutes to the existing date object.
The minute is always a number. Returned is the new date object Example: 04.May.1993 13:07:25 -> addMinute(65); -> 04.May.1993 13:12:25
DetailsaddMonth(
string|integer|array|Zend_Date $month, string|Zend_Locale $locale
=
null
)
:
Zend_DateAdds months to the existing date object.
The month can be a number or a string. Adding months lower then 0 and greater then 12 will result in adding or subtracting the relevant year. (12 months equal one year) If a localized monthname is given it will be parsed with the default locale or the optional set locale. Returned is the new date object
DetailsaddSecond(
string|integer|array|Zend_Date $second, string|Zend_Locale $locale
=
null
)
:
Zend_DateAdds seconds to the existing date object.
The second is always a number. Returned is the new date object Example: 04.May.1993 13:07:25 -> addSecond(65); -> 04.May.1993 13:08:30
DetailsaddTime(
string|integer|array|Zend_Date $time, string $format
=
null, string|Zend_Locale $locale
=
null
)
:
Zend_DateAdds a time to the existing date. Format defines how to parse the time string.
If only parts are given the other parts are set to 0. If no format is given, the standardformat of this locale is used. For example: HH:mm:ss -> 10 -> +10 hours
DetailsaddTimestamp(
integer|string|array|Zend_Date $timestamp
)
:
Zend_DateAdds a timestamp
DetailsaddWeek(
string|integer|array|Zend_Date $week, string|Zend_Locale $locale
=
null
)
:
Zend_DateAdds a week. The week is always a number. The day of week is not changed.
Returned is the new date object Example: 09.Jan.2007 13:07:25 -> addWeek(1); -> 16.Jan.2007 13:07:25
DetailsaddWeekday(
$weekday, string|Zend_Locale $locale
=
null
)
:
Zend_DateAdds weekdays to the existing date object.
The weekday can be a number or a string. If a localized dayname is given it will be parsed with the default locale or the optional set locale. Returned is the new date object Example: addWeekday(3); will add the difference of days from the begining of the month until wednesday.
DetailsaddYear(
$year, string|Zend_Locale $locale
=
null
)
:
Zend_DateAdds the year to the existing date object If the year is between 0 and 69, 2000 will be added (2000-2069) If the year if between 70 and 99, 1999 will be added (1970-1999) 3 or 4 digit years are added as expected. If you need to add years from 0-99 use add() instead.
Returned is the new date object
DetailscheckLeapYear(
integer|array|Zend_Date $year
)
:
booleanCheck a given year for leap year.
Detailscompare(
string|integer|array|Zend_Date $date, string $part
=
self, string|Zend_Locale $locale
=
null
)
:
integerCompares a date or datepart with the existing one.
Returns -1 if earlier, 0 if equal and 1 if later.
DetailscompareArpa(
string|integer|Zend_Date $date, string|Zend_Locale $locale
=
null
)
:
integerCompares a RFC 822 compilant date with the date object.
ARPA messages are used in emails or HTTP Headers. Only RFC 822 compilant date strings are accepted. For example: Sat, 14 Feb 09 00:31:30 +0100 Returns if equal, earlier or later
DetailscompareDate(
string|integer|array|Zend_Date $date, string $format
=
null, string|Zend_Locale $locale
=
null
)
:
integerCompares the date from the existing date object, ignoring the time.
Format defines how to parse the date string. If only parts are given the other parts are set to 0. If no format is given, the standardformat of this locale is used. For example: 10.01.2000 => 10.02.1999 -> false
DetailscompareDay(
string|integer|array|Zend_Date $day, string|Zend_Locale $locale
=
null
)
:
integerCompares the day with the existing date object, ignoring other date parts.
For example: 'Monday', 'en' -> 08.Jan.2007 -> 0 Returns if equal, earlier or later
DetailscompareDayOfYear(
string|integer|array|Zend_Date $day, string|Zend_Locale $locale
=
null
)
:
integerCompares the day of year with the existing date object.
For example: compareDayOfYear(33) -> 02.Feb.2007 -> 0 Returns if equal, earlier or later
DetailscompareHour(
string|integer|array|Zend_Date $hour, string|Zend_Locale $locale
=
null
)
:
integerCompares the hour with the existing date object.
For example: 10:30:25 -> compareHour(10) -> 0 Returns if equal, earlier or later
DetailscompareIso(
string|integer|Zend_Date $date, string|Zend_Locale $locale
=
null
)
:
integerCompares a ISO date with the date object. Not given parts are set to default.
Only supported ISO 8601 formats are accepted. For example: 050901 -> - 01.Sept.2005 00:00:00, 10:00:00 -> -10h Returns if equal, earlier or later
DetailscompareMilliSecond(
integer|Zend_Date $milli
=
null, integer $precision
=
null
)
:
integerCompares only the millisecond part, returning the difference
DetailscompareMinute(
string|integer|array|Zend_Date $minute, string|Zend_Locale $locale
=
null
)
:
integerCompares the minute with the existing date object.
For example: 10:30:25 -> compareMinute(30) -> 0 Returns if equal, earlier or later
DetailscompareMonth(
string|integer|array|Zend_Date $month, string|Zend_Locale $locale
=
null
)
:
integerCompares the month with the existing date object, ignoring other date parts.
For example: 10.03.2000 -> 15.03.1950 -> true Returns if equal, earlier or later
DetailscompareSecond(
string|integer|array|Zend_Date $second, string|Zend_Locale $locale
=
null
)
:
integerCompares the second with the existing date object.
For example: 10:30:25 -> compareSecond(25) -> 0 Returns if equal, earlier or later
DetailscompareTime(
string|integer|array|Zend_Date $time, string $format
=
null, string|Zend_Locale $locale
=
null
)
:
integerCompares the time from the existing date. Format defines how to parse the time string.
If only parts are given the other parts are set to default. If no format us given, the standardformat of this locale is used. For example: HH:mm:ss -> 10 -> 10 hours
DetailscompareTimestamp(
integer|string|array|Zend_Date $timestamp
)
:
integerCompares two timestamps, returning the difference as integer
DetailscompareWeek(
string|integer|array|Zend_Date $week, string|Zend_Locale $locale
=
null
)
:
integerCompares only the week part, returning the difference Returned is the new date object Returns if equal, earlier or later Example: 09.Jan.2007 13:07:25 -> compareWeek(2); -> 0
DetailscompareWeekday(
string|integer|array|Zend_Date $weekday, string|Zend_Locale $locale
=
null
)
:
integerCompares the weekday with the existing date object, ignoring other date parts.
For example: 'Monday', 'en' -> 08.Jan.2007 -> 0 Returns if equal, earlier or later
DetailscompareYear(
string|integer|array|Zend_Date $year, string|Zend_Locale $locale
=
null
)
:
integerCompares the year with the existing date object, ignoring other date parts.
For example: 10.03.2000 -> 15.02.2000 -> true Returns if equal, earlier or later
DetailscopyPart(
string $part, string|Zend_Locale $locale
=
null
)
:
Zend_DateReturns a new instance of Zend_Date with the selected part copied.
To make an exact copy, use PHP's clone keyword. For a complete list of supported date part values look into the docu. If a date part is copied, all other date parts are set to standard values. For example: If only YEAR is copied, the returned date object is equal to 01-01-YEAR 00:00:00 (01-01-1970 00:00:00 is equal to timestamp 0) If only HOUR is copied, the returned date object is equal to 01-01-1970 HOUR:00:00 (so $this contains a timestamp equal to a timestamp of 0 plus HOUR).
Detailsequals(
string|integer|array|Zend_Date $date, string $part
=
self, string|Zend_Locale $locale
=
null
)
:
booleanReturns true when both date objects or date parts are equal.
For example: 15.May.2000 <-> 15.June.2000 Equals only for Day or Year... all other will return false
Detailsget(
string $part
=
null, string|Zend_Locale $locale
=
null
)
:
stringReturns a representation of a date or datepart This could be for example a localized monthname, the time without date, the era or only the fractional seconds. There are about 50 different supported date parts.
For a complete list of supported datepart values look into the docu
DetailsgetArpa(
string|Zend_Locale $locale
=
null
)
:
stringReturns a RFC 822 compilant datestring from the date object.
This function does not return the RFC date as object. Use copy() instead.
DetailsgetDate(
string|Zend_Locale $locale
=
null
)
:
Zend_DateReturns a clone of $this, with the time part set to 00:00:00.
DetailsgetDay(
$locale $locale
=
null
)
:
Zend_DateReturns the day as new date object Example: 20.May.1986 -> 20.Jan.1970 00:00:00
DetailsgetDayOfYear(
string|Zend_Locale $locale
=
null
)
:
Zend_DateReturns the day of year as new date object Example: 02.Feb.1986 10:00:00 -> 02.Feb.1970 00:00:00
DetailsgetFractionalPrecision(
)
:
integerReturns the precision for fractional seconds
DetailsgetFullYear(
integer $value
)
:
integerCounts the exact year number < 70 - 2000 added, >70 < 100 - 1900, others just returned
DetailsgetHour(
$locale $locale
=
null
)
:
Zend_DateReturns the hour as new date object Example: 02.Feb.1986 10:30:25 -> 01.Jan.1970 10:00:00
DetailsgetIso(
string|Zend_Locale $locale
=
null
)
:
stringReturns the full ISO 8601 date from the date object.
Always the complete ISO 8601 specifiction is used. If an other ISO date is needed (ISO 8601 defines several formats) use toString() instead. This function does not return the ISO date as object. Use copy() instead.
DetailsgetLocale(
)
:
stringReturns the actual set locale
DetailsgetMilliSecond(
)
:
stringReturns the milliseconds of the date object
DetailsgetMinute(
string|Zend_Locale $locale
=
null
)
:
Zend_DateReturns the minute as new date object Example: 02.Feb.1986 10:30:25 -> 01.Jan.1970 00:30:00
DetailsgetMonth(
string|Zend_Locale $locale
=
null
)
:
Zend_DateReturns only the month from the date object as new object.
For example: 10.May.2000 10:30:00 -> 01.May.1970 00:00:00
DetailsgetSecond(
string|Zend_Locale $locale
=
null
)
:
Zend_DateReturns the second as new date object Example: 02.Feb.1986 10:30:25 -> 01.Jan.1970 00:00:25
DetailsgetSunInfo(
$location $location
)
:
arrayReturns an array with the sunset and sunrise dates for all horizon types For a list of cities and correct locations use the class Zend_Date_Cities
DetailsgetSunrise(
$location $location
)
:
Zend_DateReturns the time of sunrise for this date and a given location as new date object For a list of cities and correct locations use the class Zend_Date_Cities
DetailsgetSunset(
$location $location
)
:
Zend_DateReturns the time of sunset for this date and a given location as new date object For a list of cities and correct locations use the class Zend_Date_Cities
DetailsgetTime(
string|Zend_Locale $locale
=
null
)
:
Zend_DateReturns only the time of the date as new Zend_Date object For example: 15.May.2000 10:11:23 will return a dateobject equal to 01.Jan.1970 10:11:23
DetailsgetTimestamp(
)
:
integer|stringReturns this object's internal UNIX timestamp (equivalent to Zend_Date::TIMESTAMP).
If the timestamp is too large for integers, then the return value will be a string. This function does not return the timestamp as an object. Use clone() or copyPart() instead.
DetailsgetTimezoneFromString(
string $zone
)
:
integerInternal function, returns the offset of a given timezone
DetailsgetWeek(
$locale $locale
=
null
)
:
Zend_DateReturns the week as new date object using monday as begining of the week Example: 12.Jan.2007 -> 08.Jan.1970 00:00:00
DetailsgetWeekday(
$locale $locale
=
null
)
:
Zend_DateReturns the weekday as new date object Weekday is always from 1-7 Example: 09-Jan-2007 -> 2 = Tuesday -> 02-Jan-1970 (when 02.01.1970 is also Tuesday)
DetailsgetYear(
string|Zend_Locale $locale
=
null
)
:
Zend_DateReturns only the year from the date object as new object.
For example: 10.May.2000 10:30:00 -> 01.Jan.2000 00:00:00
DetailsisDate(
string|array|Zend_Date $date, string $format
=
null, string|Zend_Locale $locale
=
null
)
:
booleanChecks if the given date is a real date or datepart.
Returns false if a expected datepart is missing or a datepart exceeds its possible border. But the check will only be done for the expected dateparts which are given by format. If no format is given the standard dateformat for the actual locale is used. f.e. 30.February.2007 will return false if format is 'dd.MMMM.YYYY'
DetailsisEarlier(
string|integer|array|Zend_Date $date, string $part
=
null, string|Zend_Locale $locale
=
null
)
:
booleanReturns if the given date or datepart is earlier For example: 15.May.2000 <-> 13.June.1999 will return true for day, year and date, but not for month
DetailsisLater(
string|integer|array|Zend_Date $date, string $part
=
null, string|Zend_Locale $locale
=
null
)
:
booleanReturns if the given date or datepart is later For example: 15.May.2000 <-> 13.June.1999 will return true for month but false for day, year and date Returns if the given date is later
DetailsisLeapYear(
)
:
booleanReturns true, if the year is a leap year.
DetailsisToday(
)
:
booleanReturns if the set date is todays date
DetailsisTomorrow(
)
:
booleanReturns if the set date is tomorrows date
DetailsisYesterday(
)
:
booleanReturns if the set date is yesterdays date
Detailsnow(
string|Zend_Locale $locale
=
null
)
:
Zend_DateReturns the actual date as new date object
Detailsset(
string|integer|array|Zend_Date $date, string $part
=
null, string|Zend_Locale $locale
=
null
)
:
Zend_DateSets the given date as new date or a given datepart as new datepart returning the new datepart This could be for example a localized dayname, the date without time, the month or only the seconds. There are about 50 different supported date parts.
For a complete list of supported datepart values look into the docu
DetailssetArpa(
string|integer|Zend_Date $date, string|Zend_Locale $locale
=
null
)
:
Zend_DateSets a RFC 822 date as new date for the date object.
Only RFC 822 compilant date strings are accepted. For example: Sat, 14 Feb 09 00:31:30 +0100 Returned is the new date object
DetailssetDate(
string|integer|array|Zend_Date $date, string $format
=
null, string|Zend_Locale $locale
=
null
)
:
Zend_DateSets a new date for the date object. Format defines how to parse the date string.
Also a complete date with time can be given, but only the date is used for setting. For example: MMMM.yy HH:mm-> May.07 22:11 => 01.May.07 00:00 Returned is the new date object and the existing time is left as it was before
DetailssetDay(
$day, string|Zend_Locale $locale
=
null
)
:
Zend_DateSets a new day The day can be a number or a string. Setting days lower then 0 or greater than the number of this months days will result in adding or subtracting the relevant month.
If a localized dayname is given it will be parsed with the default locale or the optional set locale. Returned is the new date object Example: setDay('Montag', 'de_AT'); will set the monday of this week as day.
DetailssetDayOfYear(
string|integer|array|Zend_Date $day, string|Zend_Locale $locale
=
null
)
:
Zend_DateSets a new day of year The day of year is always a number.
Returned is the new date object Example: 04.May.2004 -> setDayOfYear(10) -> 10.Jan.2004
DetailssetFractionalPrecision(
integer $precision
)
:
Zend_DateSets a new precision for fractional seconds
DetailssetHour(
string|integer|array|Zend_Date $hour, string|Zend_Locale $locale
=
null
)
:
Zend_DateSets a new hour The hour is always a number.
Returned is the new date object Example: 04.May.1993 13:07:25 -> setHour(7); -> 04.May.1993 07:07:25
DetailssetIso(
string|integer|Zend_Date $date, string|Zend_Locale $locale
=
null
)
:
Zend_DateSets a new date for the date object. Not given parts are set to default.
Only supported ISO 8601 formats are accepted. For example: 050901 -> 01.Sept.2005 00:00:00, 20050201T10:00:30 -> 01.Feb.2005 10h00m30s Returned is the new date object
DetailssetLocale(
string|Zend_Locale $locale
=
null
)
:
Zend_DateSets a new standard locale for the date object.
This locale will be used for all functions Returned is the really set locale. Example: 'de_XX' will be set to 'de' because 'de_XX' does not exist 'xx_YY' will be set to 'root' because 'xx' does not exist
DetailssetMilliSecond(
integer|Zend_Date $milli
=
null, integer $precision
=
null
)
:
Zend_DateSets new milliseconds for the date object Example: setMilliSecond(550, 2) -> equals +5 Sec +50 MilliSec
DetailssetMinute(
string|integer|array|Zend_Date $minute, string|Zend_Locale $locale
=
null
)
:
Zend_DateSets a new minute The minute is always a number.
Returned is the new date object Example: 04.May.1993 13:07:25 -> setMinute(29); -> 04.May.1993 13:29:25
DetailssetMonth(
string|integer|array|Zend_Date $month, string|Zend_Locale $locale
=
null
)
:
Zend_DateSets a new month The month can be a number or a string. Setting months lower then 0 and greater then 12 will result in adding or subtracting the relevant year. (12 months equal one year) If a localized monthname is given it will be parsed with the default locale or the optional set locale.
Returned is the new date object
DetailssetOptions(
array $options
=
array
)
:
OptionsSets class wide options, if no option was given, the actual set options will be returned
DetailssetSecond(
string|integer|array|Zend_Date $second, string|Zend_Locale $locale
=
null
)
:
Zend_DateSets new seconds to the existing date object.
The second is always a number. Returned is the new date object Example: 04.May.1993 13:07:25 -> setSecond(100); -> 04.May.1993 13:08:40
DetailssetTime(
string|integer|array|Zend_Date $time, string $format
=
null, string|Zend_Locale $locale
=
null
)
:
Zend_DateSets a new time for the date object. Format defines how to parse the time string.
Also a complete date can be given, but only the time is used for setting. For example: dd.MMMM.yyTHH:mm' and 'ss sec'-> 10.May.07T25:11 and 44 sec => 1h11min44sec + 1 day Returned is the new date object and the existing date is left as it was before
DetailssetTimestamp(
integer|string|array|Zend_Date $timestamp
)
:
Zend_DateSets a new timestamp
DetailssetWeek(
string|integer|array|Zend_Date $week, string|Zend_Locale $locale
=
null
)
:
Zend_DateSets a new week. The week is always a number. The day of week is not changed.
Returned is the new date object Example: 09.Jan.2007 13:07:25 -> setWeek(1); -> 02.Jan.2007 13:07:25
DetailssetWeekday(
$weekday, string|Zend_Locale $locale
=
null
)
:
Zend_DateSets a new weekday The weekday can be a number or a string. If a localized weekday name is given, then it will be parsed as a date in $locale (defaults to the same locale as $this).
Returned is the new date object. Example: setWeekday(3); will set the wednesday of this week as day.
DetailssetYear(
$year, string|Zend_Locale $locale
=
null
)
:
Zend_DateSets a new year If the year is between 0 and 69, 2000 will be set (2000-2069) If the year if between 70 and 99, 1999 will be set (1970-1999) 3 or 4 digit years are set as expected. If you need to set year 0-99 use set() instead.
Returned is the new date object
Detailssub(
string|integer|array|Zend_Date $date, string $part
=
self, string|Zend_Locale $locale
=
null
)
:
Zend_DateSubtracts a date from another date.
This could be for example a RFC2822 date, the time, the year or only the timestamp. There are about 50 different supported date parts. For a complete list of supported datepart values look into the docu Be aware: Adding -2 Months is not equal to Subtracting 2 Months !!!
DetailssubArpa(
string|integer|Zend_Date $date, string|Zend_Locale $locale
=
null
)
:
Zend_DateSubtracts a RFC 822 date from the date object.
ARPA messages are used in emails or HTTP Headers. Only RFC 822 compilant date strings are accepted. For example: Sat, 14 Feb 09 00:31:30 +0100 Returned is the new date object
DetailssubDate(
string|integer|array|Zend_Date $date, string $format
=
null, string|Zend_Locale $locale
=
null
)
:
Zend_DateSubtracts a date from the existing date object. Format defines how to parse the date string.
If only parts are given the other parts are set to 0. If no format is given, the standardformat of this locale is used. For example: MM.dd.YYYY -> 10 -> -10 months Be aware: Subtracting 2 months is not equal to Adding -2 months !!!
DetailssubDay(
$day, string|Zend_Locale $locale
=
null
)
:
Zend_DateSubtracts days from the existing date object.
The day can be a number or a string. Subtracting days lower then 0 or greater than the number of this months days will result in adding or subtracting the relevant month. If a localized dayname is given it will be parsed with the default locale or the optional set locale.
DetailssubDayOfYear(
string|integer|array|Zend_Date $day, string|Zend_Locale $locale
=
null
)
:
Zend_DateSubtracts a day of year from the existing date object.
The day of year is always a number. Returned is the new date object Example: subDayOfYear(10); will subtract 10 days from the existing date object.
DetailssubHour(
string|integer|array|Zend_Date $hour, string|Zend_Locale $locale
=
null
)
:
Zend_DateSubtracts hours from the existing date object.
The hour is always a number. Returned is the new date object Example: 04.May.1993 13:07:25 -> subHour(6); -> 05.May.1993 07:07:25
DetailssubIso(
string|integer|Zend_Date $date, string|Zend_Locale $locale
=
null
)
:
Zend_DateSubtracts a ISO date from the date object. Not given parts are set to default.
Only supported ISO 8601 formats are accepted. For example: 050901 -> - 01.Sept.2005 00:00:00, 10:00:00 -> -10h Returned is the new date object
DetailssubMilliSecond(
integer|Zend_Date $milli
=
null, integer $precision
=
null
)
:
Zend_DateSubtracts a millisecond
DetailssubMinute(
string|integer|array|Zend_Date $minute, string|Zend_Locale $locale
=
null
)
:
Zend_DateSubtracts minutes from the existing date object.
The minute is always a number. Returned is the new date object Example: 04.May.1993 13:07:25 -> subMinute(9); -> 04.May.1993 12:58:25
DetailssubMonth(
string|integer|array|Zend_Date $month, string|Zend_Locale $locale
=
null
)
:
Zend_DateSubtracts months from the existing date object.
The month can be a number or a string. Subtracting months lower then 0 and greater then 12 will result in adding or subtracting the relevant year. (12 months equal one year) If a localized monthname is given it will be parsed with the default locale or the optional set locale. Returned is the new date object
DetailssubSecond(
string|integer|array|Zend_Date $second, string|Zend_Locale $locale
=
null
)
:
Zend_DateSubtracts seconds from the existing date object.
The second is always a number. Returned is the new date object Example: 04.May.1993 13:07:25 -> subSecond(10); -> 04.May.1993 13:07:15
DetailssubTime(
string|integer|array|Zend_Date $time, string $format
=
null, string|Zend_Locale $locale
=
null
)
:
Zend_DateSubtracts a time from the existing date. Format defines how to parse the time string.
If only parts are given the other parts are set to 0. If no format is given, the standardformat of this locale is used. For example: HH:mm:ss -> 10 -> -10 hours
DetailssubTimestamp(
integer|string|array|Zend_Date $timestamp
)
:
Zend_DateSubtracts a timestamp
DetailssubWeek(
string|integer|array|Zend_Date $week, string|Zend_Locale $locale
=
null
)
:
Zend_DateSubtracts a week. The week is always a number. The day of week is not changed.
Returned is the new date object Example: 09.Jan.2007 13:07:25 -> subWeek(1); -> 02.Jan.2007 13:07:25
DetailssubWeekday(
$weekday, string|Zend_Locale $locale
=
null
)
:
Zend_DateSubtracts weekdays from the existing date object.
The weekday can be a number or a string. If a localized dayname is given it will be parsed with the default locale or the optional set locale. Returned is the new date object Example: subWeekday(3); will subtract the difference of days from the begining of the month until wednesday.
DetailssubYear(
$year, string|Zend_Locale $locale
=
null
)
:
Zend_DateSubs the year from the existing date object If the year is between 0 and 69, 2000 will be subtracted (2000-2069) If the year if between 70 and 99, 1999 will be subtracted (1970-1999) 3 or 4 digit years are subtracted as expected. If you need to subtract years from 0-99 use sub() instead.
Returned is the new date object
DetailstoArray(
)
:
arrayReturns an array representation of the object
DetailstoString(
string $format
=
null, string $type
=
null, string|Zend_Locale $locale
=
null
)
:
stringReturns a string representation of the object Supported format tokens are: G - era, y - year, Y - ISO year, M - month, w - week of year, D - day of year, d - day of month E - day of week, e - number of weekday (1-7), h - hour 1-12, H - hour 0-23, m - minute, s - second A - milliseconds of day, z - timezone, Z - timezone offset, S - fractional second, a - period of day
Additionally format tokens but non ISO conform are: SS - day suffix, eee - php number of weekday(0-6), ddd - number of days per month l - Leap year, B - swatch internet time, I - daylight saving time, X - timezone offset in seconds r - RFC2822 format, U - unix timestamp
Not supported ISO tokens are u - extended year, Q - quarter, q - quarter, L - stand alone month, W - week of month F - day of week of month, g - modified julian, c - stand alone weekday, k - hour 0-11, K - hour 1-24 v - wall zone
DetailstoValue(
string|integer|Zend_Date $part
=
null
)
:
integer|falseReturns a integer representation of the object But returns false when the given part is no value f.e. Month-Name
Details