&date.formats.parameter;
* @param now int[optional]* The timestamp which is used as a base for the calculation of relative * dates. *
* @return int a timestamp on success, false otherwise. Previous to PHP 5.1.0, * this function would return -1 on failure. */ function strtotime ($time, $now = null) {} /** * Format a local time/date * @link http://www.php.net/manual/en/function.date.php * @param format string* The format of the outputted date string. See the formatting * options below. There are also several * predefined date constants * that may be used instead, so for example DATE_RSS * contains the format string 'D, d M Y H:i:s'. *
**
| format character | *Description | *Example returned values | *
| --- | *--- | *|
| d | *Day of the month, 2 digits with leading zeros | *01 to 31 | *
| D | *A textual representation of a day, three letters | *Mon through Sun | *
| j | *Day of the month without leading zeros | *1 to 31 | *
| l (lowercase 'L') | *A full textual representation of the day of the week | *Sunday through Saturday | *
| N | *ISO-8601 numeric representation of the day of the week (added in * PHP 5.1.0) | *1 (for Monday) through 7 (for Sunday) | *
| S | *English ordinal suffix for the day of the month, 2 characters | ** st, nd, rd or * th. Works well with j * | *
| w | *Numeric representation of the day of the week | *0 (for Sunday) through 6 (for Saturday) | *
| z | *The day of the year (starting from 0) | *0 through 365 | *
| --- | *--- | *|
| W | *ISO-8601 week number of year, weeks starting on Monday (added in PHP 4.1.0) | *Example: 42 (the 42nd week in the year) | *
| --- | *--- | *|
| F | *A full textual representation of a month, such as January or March | *January through December | *
| m | *Numeric representation of a month, with leading zeros | *01 through 12 | *
| M | *A short textual representation of a month, three letters | *Jan through Dec | *
| n | *Numeric representation of a month, without leading zeros | *1 through 12 | *
| t | *Number of days in the given month | *28 through 31 | *
| --- | *--- | *|
| L | *Whether it's a leap year | *1 if it is a leap year, 0 otherwise. | *
| o | *ISO-8601 year number. This has the same value as * Y, except that if the ISO week number * (W) belongs to the previous or next year, that year * is used instead. (added in PHP 5.1.0) | *Examples: 1999 or 2003 | *
| Y | *A full numeric representation of a year, 4 digits | *Examples: 1999 or 2003 | *
| y | *A two digit representation of a year | *Examples: 99 or 03 | *
| --- | *--- | *|
| a | *Lowercase Ante meridiem and Post meridiem | *am or pm | *
| A | *Uppercase Ante meridiem and Post meridiem | *AM or PM | *
| B | *Swatch Internet time | *000 through 999 | *
| g | *12-hour format of an hour without leading zeros | *1 through 12 | *
| G | *24-hour format of an hour without leading zeros | *0 through 23 | *
| h | *12-hour format of an hour with leading zeros | *01 through 12 | *
| H | *24-hour format of an hour with leading zeros | *00 through 23 | *
| i | *Minutes with leading zeros | *00 to 59 | *
| s | *Seconds, with leading zeros | *00 through 59 | *
| u | ** Microseconds (added in PHP 5.2.2). Note that * date will always generate * 000000 since it takes an integer * parameter, whereas DateTime::format does * support microseconds. * | *Example: 654321 | *
| --- | *--- | *|
| e | *Timezone identifier (added in PHP 5.1.0) | *Examples: UTC, GMT, Atlantic/Azores | *
| I (capital i) | *Whether or not the date is in daylight saving time | *1 if Daylight Saving Time, 0 otherwise. | *
| O | *Difference to Greenwich time (GMT) in hours | *Example: +0200 | *
| P | *Difference to Greenwich time (GMT) with colon between hours and minutes (added in PHP 5.1.3) | *Example: +02:00 | *
| T | *Timezone abbreviation | *Examples: EST, MDT ... | *
| Z | *Timezone offset in seconds. The offset for timezones west of UTC is always * negative, and for those east of UTC is always positive. | *-43200 through 50400 | *
| --- | *--- | *|
| c | *ISO 8601 date (added in PHP 5) | *2004-02-12T15:19:21+00:00 | *
| r | *RFC 2822 formatted date | *Example: Thu, 21 Dec 2000 16:01:07 +0200 | *
| U | *Seconds since the Unix Epoch (January 1 1970 00:00:00 GMT) | *See also time | *
* Unrecognized characters in the format string will be printed * as-is. The Z format will always return * 0 when using gmdate. *
* ** Since this function only accepts integer timestamps the * u format character is only useful when using the * date_format function with user based timestamps * created with date_create. *
* @param timestamp int[optional] * @return string a formatted date string. If a non-numeric value is used for * timestamp, false is returned and an * E_WARNING level error is emitted. */ function date ($format, $timestamp = null) {} /** * Format a local time/date as integer * @link http://www.php.net/manual/en/function.idate.php * @param format string*
| format character | *Description | *
| B | *Swatch Beat/Internet Time | *
| d | *Day of the month | *
| h | *Hour (12 hour format) | *
| H | *Hour (24 hour format) | *
| i | *Minutes | *
| I (uppercase i) | *returns 1 if DST is activated, * 0 otherwise | *
| L (uppercase l) | *returns 1 for leap year, * 0 otherwise | *
| m | *Month number | *
| s | *Seconds | *
| t | *Days in current month | *
| U | *Seconds since the Unix Epoch - January 1 1970 00:00:00 UTC - * this is the same as time | *
| w | *Day of the week (0 on Sunday) | *
| W | *ISO-8601 week number of year, weeks starting on * Monday | *
| y | *Year (1 or 2 digits - check note below) | *
| Y | *Year (4 digits) | *
| z | *Day of the year | *
| Z | *Timezone offset in seconds | *
* As idate always returns an integer and * as they can't start with a "0", idate may return * fewer digits than you would expect. See the example below. */ function idate ($format, $timestamp = null) {} /** * Format a GMT/UTC date/time * @link http://www.php.net/manual/en/function.gmdate.php * @param format string
* The format of the outputted date string. See the formatting * options for the date function. *
* @param timestamp int[optional] * @return string a formatted date string. If a non-numeric value is used for * timestamp, false is returned and an * E_WARNING level error is emitted. */ function gmdate ($format, $timestamp = null) {} /** * Get Unix timestamp for a date * @link http://www.php.net/manual/en/function.mktime.php * @param hour int[optional]* The number of the hour relative to the start of the day determined by * month, day and year. * Negative values reference the hour before midnight of the day in question. * Values greater than 23 reference the appropriate hour in the following day(s). *
* @param minute int[optional]* The number of the minute relative to the start of the hour. * Negative values reference the minute in the previous hour. * Values greater than 59 reference the appropriate minute in the following hour(s). *
* @param second int[optional]* The number of seconds relative to the start of the minute. * Negative values reference the second in the previous minute. * Values greater than 59 reference the appropriate second in the following minute(s). *
* @param month int[optional]* The number of the month relative to the end of the previous year. * Values 1 to 12 reference the normal calendar months of the year in question. * Values less than 1 (including negative values) reference the months in the previous year in reverse order, so 0 is December, -1 is November, etc. * Values greater than 12 reference the appropriate month in the following year(s). *
* @param day int[optional]* The number of the day relative to the end of the previous month. * Values 1 to 28, 29, 30 or 31 (depending upon the month) reference the normal days in the relevant month. * Values less than 1 (including negative values) reference the days in the previous month, so 0 is the last day of the previous month, -1 is the day before that, etc. * Values greater than the number of days in the relevant month reference the appropriate day in the following month(s). *
* @param year int[optional]* The number of the year, may be a two or four digit value, * with values between 0-69 mapping to 2000-2069 and 70-100 to * 1970-2000. On systems where time_t is a 32bit signed integer, as * most common today, the valid range for year * is somewhere between 1901 and 2038. However, before PHP 5.1.0 this * range was limited from 1970 to 2038 on some systems (e.g. Windows). *
* @param is_dst int[optional]* This parameter can be set to 1 if the time is during daylight savings time (DST), * 0 if it is not, or -1 (the default) if it is unknown whether the time is within * daylight savings time or not. If it's unknown, PHP tries to figure it out itself. * This can cause unexpected (but not incorrect) results. * Some times are invalid if DST is enabled on the system PHP is running on or * is_dst is set to 1. If DST is enabled in e.g. 2:00, all times * between 2:00 and 3:00 are invalid and mktime returns an undefined * (usually negative) value. * Some systems (e.g. Solaris 8) enable DST at midnight so time 0:30 of the day when DST * is enabled is evaluated as 23:30 of the previous day. *
* ** As of PHP 5.1.0, this parameter became deprecated. As a result, the * new timezone handling features should be used instead. *
* @return int mktime returns the Unix timestamp of the arguments * given. * If the arguments are invalid, the function returns false (before PHP 5.1 * it returned -1). */ function mktime ($hour = null, $minute = null, $second = null, $month = null, $day = null, $year = null, $is_dst = null) {} /** * Get Unix timestamp for a GMT date * @link http://www.php.net/manual/en/function.gmmktime.php * @param hour int[optional]* The number of the hour relative to the start of the day determined by * month, day and year. * Negative values reference the hour before midnight of the day in question. * Values greater than 23 reference the appropriate hour in the following day(s). *
* @param minute int[optional]* The number of the minute relative to the start of the hour. * Negative values reference the minute in the previous hour. * Values greater than 59 reference the appropriate minute in the following hour(s). *
* @param second int[optional]* The number of seconds relative to the start of the minute. * Negative values reference the second in the previous minute. * Values greater than 59 reference the appropriate second in the following minute(s). *
* @param month int[optional]* The number of the month relative to the end of the previous year. * Values 1 to 12 reference the normal calendar months of the year in question. * Values less than 1 (including negative values) reference the months in the previous year in reverse order, so 0 is December, -1 is November, etc. * Values greater than 12 reference the appropriate month in the following year(s). *
* @param day int[optional]* The number of the day relative to the end of the previous month. * Values 1 to 28, 29, 30 or 31 (depending upon the month) reference the normal days in the relevant month. * Values less than 1 (including negative values) reference the days in the previous month, so 0 is the last day of the previous month, -1 is the day before that, etc. * Values greater than the number of days in the relevant month reference the appropriate day in the following month(s). *
* @param year int[optional]* The year *
* @param is_dst int[optional]* Parameters always represent a GMT date so is_dst * doesn't influence the result. *
* @return int a integer Unix timestamp. */ function gmmktime ($hour = null, $minute = null, $second = null, $month = null, $day = null, $year = null, $is_dst = null) {} /** * Validate a Gregorian date * @link http://www.php.net/manual/en/function.checkdate.php * @param month int* The month is between 1 and 12 inclusive. *
* @param day int* The day is within the allowed number of days for the given * month. Leap years * are taken into consideration. *
* @param year int* The year is between 1 and 32767 inclusive. *
* @return bool true if the date given is valid; otherwise returns false. */ function checkdate ($month, $day, $year) {} /** * Format a local time/date according to locale settings * @link http://www.php.net/manual/en/function.strftime.php * @param format string*
| format | *Description | *Example returned values | *
| --- | *--- | *|
| %a | *An abbreviated textual representation of the day | *Sun through Sat | *
| %A | *A full textual representation of the day | *Sunday through Saturday | *
| %d | *Two-digit day of the month (with leading zeros) | *01 to 31 | *
| %e | ** Day of the month, with a space preceding single digits. Not * implemented as described on Windows. See below for more information. * | *1 to 31 | *
| %j | *Day of the year, 3 digits with leading zeros | *001 to 366 | *
| %u | *ISO-8601 numeric representation of the day of the week | *1 (for Monday) though 7 (for Sunday) | *
| %w | *Numeric representation of the day of the week | *0 (for Sunday) through 6 (for Saturday) | *
| --- | *--- | *|
| %U | *Week number of the given year, starting with the first * Sunday as the first week | *13 (for the 13th full week of the year) | *
| %V | *ISO-8601:1988 week number of the given year, starting with * the first week of the year with at least 4 weekdays, with Monday * being the start of the week | *01 through 53 (where 53 * accounts for an overlapping week) | *
| %W | *A numeric representation of the week of the year, starting * with the first Monday as the first week | *46 (for the 46th week of the year beginning * with a Monday) | *
| --- | *--- | *|
| %b | *Abbreviated month name, based on the locale | *Jan through Dec | *
| %B | *Full month name, based on the locale | *January through December | *
| %h | *Abbreviated month name, based on the locale (an alias of %b) | *Jan through Dec | *
| %m | *Two digit representation of the month | *01 (for January) through 12 (for December) | *
| --- | *--- | *|
| %C | *Two digit representation of the century (year divided by 100, truncated to an integer) | *19 for the 20th Century | *
| %g | *Two digit representation of the year going by ISO-8601:1988 standards (see %V) | *Example: 09 for the week of January 6, 2009 | *
| %G | *The full four-digit version of %g | *Example: 2008 for the week of January 3, 2009 | *
| %y | *Two digit representation of the year | *Example: 09 for 2009, 79 for 1979 | *
| %Y | *Four digit representation for the year | *Example: 2038 | *
| --- | *--- | *|
| %H | *Two digit representation of the hour in 24-hour format | *00 through 23 | *
| %k | *Two digit representation of the hour in 24-hour format, with * a space preceding single digits | *0 through 23 | *
| %I | *Two digit representation of the hour in 12-hour format | *01 through 12 | *
| %l (lower-case 'L') | *Hour in 12-hour format, with a space preceding single digits | *1 through 12 | *
| %M | *Two digit representation of the minute | *00 through 59 | *
| %p | *UPPER-CASE 'AM' or 'PM' based on the given time | *Example: AM for 00:31, PM for 22:23 | *
| %P | *lower-case 'am' or 'pm' based on the given time | *Example: am for 00:31, pm for 22:23 | *
| %r | *Same as "%I:%M:%S %p" | *Example: 09:34:17 PM for 21:34:17 | *
| %R | *Same as "%H:%M" | *Example: 00:35 for 12:35 AM, 16:44 for 4:44 PM | *
| %S | *Two digit representation of the second | *00 through 59 | *
| %T | *Same as "%H:%M:%S" | *Example: 21:34:17 for 09:34:17 PM | *
| %X | *Preferred time representation based on locale, without the date | *Example: 03:59:16 or 15:59:16 | *
| %z | *The time zone offset. Not implemented as described on * Windows. See below for more information. | *Example: -0500 for US Eastern Time | *
| %Z | *The time zone abbreviation. Not implemented as described on * Windows. See below for more information. | *Example: EST for Eastern Time | *
| --- | *--- | *|
| %c | *Preferred date and time stamp based on locale | *Example: Tue Feb 5 00:45:10 2009 for * February 5, 2009 at 12:45:10 AM | *
| %D | *Same as "%m/%d/%y" | *Example: 02/05/09 for February 5, 2009 | *
| %F | *Same as "%Y-%m-%d" (commonly used in database datestamps) | *Example: 2009-02-05 for February 5, 2009 | *
| %s | *Unix Epoch Time timestamp (same as the time * function) | *Example: 305815200 for September 10, 1979 08:40:00 AM | *
| %x | *Preferred date representation based on locale, without the time | *Example: 02/05/09 for February 5, 2009 | *
| --- | *--- | *|
| %n | *A newline character ("\n") | *--- | *
| %t | *A Tab character ("\t") | *--- | *
| %% | *A literal percentage character ("%") | *--- | *
* Maximum length of this parameter is 1023 characters. *
* * * Contrary to ISO-9899:1999, Sun Solaris starts with Sunday as 1. As a * result, %u may not function as described in this * manual. * * * ** Windows only: *
** The %e modifier is not supported in the Windows * implementation of this function. To achieve this value, the * %#d modifier can be used instead. The example below * illustrates how to write a cross platform compatible function. *
** The %z and %Z modifiers both * return the time zone name instead of the offset or abbreviation. *
* * * * Mac OS X only: The %P modifier * is not supported in the Mac OS X implementation of this function. * @param timestamp int[optional] * @return string a string formatted according format * using the given timestamp or the current * local time if no timestamp is given. Month and weekday names and * other language-dependent strings respect the current locale set * with setlocale. */ function strftime ($format, $timestamp = null) {} /** * Format a GMT/UTC time/date according to locale settings * @link http://www.php.net/manual/en/function.gmstrftime.php * @param format string* See description in strftime. *
* @param timestamp int[optional] * @return string a string formatted according to the given format string * using the given timestamp or the current * local time if no timestamp is given. Month and weekday names and * other language dependent strings respect the current locale set * with setlocale. */ function gmstrftime ($format, $timestamp = null) {} /** * Return current Unix timestamp * @link http://www.php.net/manual/en/function.time.php * @return int */ function time () {} /** * Get the local time * @link http://www.php.net/manual/en/function.localtime.php * @param timestamp int[optional] * @param is_associative bool[optional]* If set to false or not supplied then the array is returned as a regular, * numerically indexed array. If the argument is set to true then * localtime returns an associative array containing * all the different elements of the structure returned by the C * function call to localtime. The names of the different keys of * the associative array are as follows: *
** * * * "tm_sec" - seconds, 0 to 59 * @return array */ function localtime ($timestamp = null, $is_associative = null) {} /** * Get date/time information * @link http://www.php.net/manual/en/function.getdate.php * @param timestamp int[optional] * @return array an associative array of information related to * the timestamp. Elements from the returned * associative array are as follows: *
**
| Key | *Description | *Example returned values | *
| "seconds" | *Numeric representation of seconds | *0 to 59 | *
| "minutes" | *Numeric representation of minutes | *0 to 59 | *
| "hours" | *Numeric representation of hours | *0 to 23 | *
| "mday" | *Numeric representation of the day of the month | *1 to 31 | *
| "wday" | *Numeric representation of the day of the week | *0 (for Sunday) through 6 (for Saturday) | *
| "mon" | *Numeric representation of a month | *1 through 12 | *
| "year" | *A full numeric representation of a year, 4 digits | *Examples: 1999 or 2003 | *
| "yday" | *Numeric representation of the day of the year | *0 through 365 | *
| "weekday" | *A full textual representation of the day of the week | *Sunday through Saturday | *
| "month" | *A full textual representation of a month, such as January or March | *January through December | *
| 0 | ** Seconds since the Unix Epoch, similar to the values returned by * time and used by date. * | ** System Dependent, typically -2147483648 through * 2147483647. * | *
* Date in format accepted by strtotime. *
* @return array array with information about the parsed date * on success&return.falseforfailure;. */ function date_parse ($date) {} /** * Get info about given date formatted according to the specified format * @link http://www.php.net/manual/en/function.date-parse-from-format.php * @param format string* Format accepted by DateTime::createFromFormat. *
* @param date string* String representing the date. *
* @return array associative array with detailed info about given date. */ function date_parse_from_format ($format, $date) {} /** * &Alias;* Time zone abbreviation. *
* @param gmtOffset int[optional]* Offset from GMT in seconds. Defaults to -1 which means that first found * time zone corresponding to abbr is returned. * Otherwise exact offset is searched and only if not found then the first * time zone with any offset is returned. *
* @param isdst int[optional]* Daylight saving time indicator. Defaults to -1, which means that * whether the time zone has daylight saving or not is not taken into * consideration when searching. If this is set to 1, then the * gmtOffset is assumed to be an offset with * daylight saving in effect; if 0, then gmtOffset * is assumed to be an offset without daylight saving in effect. If * abbr doesn't exist then the time zone is * searched solely by the gmtOffset and * isdst. *
* @return string time zone name on success&return.falseforfailure;. */ function timezone_name_from_abbr ($abbr, $gmtOffset = null, $isdst = null) {} /** * &Alias;* The timezone identifier, like UTC or * Europe/Lisbon. The list of valid identifiers is * available in the . *
* @return bool This function returns false if the * timezone_identifier isn't valid, or true * otherwise. */ function date_default_timezone_set ($timezone_identifier) {} /** * Gets the default timezone used by all date/time functions in a script * @link http://www.php.net/manual/en/function.date-default-timezone-get.php * @return string a string. */ function date_default_timezone_get () {} /** * Returns time of sunrise for a given day and location * @link http://www.php.net/manual/en/function.date-sunrise.php * @param timestamp int* The timestamp of the day from which the sunrise * time is taken. *
* @param format int[optional]*
| constant | *description | *example | *
| SUNFUNCS_RET_STRING | *returns the result as string | *16:46 | *
| SUNFUNCS_RET_DOUBLE | *returns the result as float | *16.78243132 | *
| SUNFUNCS_RET_TIMESTAMP | *returns the result as integer (timestamp) | *1095034606 | *
* Defaults to North, pass in a negative value for South. * See also: date.default_latitude *
* @param longitude float[optional]* Defaults to East, pass in a negative value for West. * See also: date.default_longitude *
* @param zenith float[optional]* Default: date.sunrise_zenith *
* @param gmt_offset float[optional] * @return mixed the sunrise time in a specified format on * success&return.falseforfailure;. */ function date_sunrise ($timestamp, $format = null, $latitude = null, $longitude = null, $zenith = null, $gmt_offset = null) {} /** * Returns time of sunset for a given day and location * @link http://www.php.net/manual/en/function.date-sunset.php * @param timestamp int* The timestamp of the day from which the sunset * time is taken. *
* @param format int[optional]*
| constant | *description | *example | *
| SUNFUNCS_RET_STRING | *returns the result as string | *16:46 | *
| SUNFUNCS_RET_DOUBLE | *returns the result as float | *16.78243132 | *
| SUNFUNCS_RET_TIMESTAMP | *returns the result as integer (timestamp) | *1095034606 | *
* Defaults to North, pass in a negative value for South. * See also: date.default_latitude *
* @param longitude float[optional]* Defaults to East, pass in a negative value for West. * See also: date.default_longitude *
* @param zenith float[optional]* Default: date.sunset_zenith *
* @param gmt_offset float[optional] * @return mixed the sunset time in a specified format on * success&return.falseforfailure;. */ function date_sunset ($timestamp, $format = null, $latitude = null, $longitude = null, $zenith = null, $gmt_offset = null) {} /** * Returns an array with information about sunset/sunrise and twilight begin/end * @link http://www.php.net/manual/en/function.date-sun-info.php * @param time int* Timestamp. *
* @param latitude float* Latitude in degrees. *
* @param longitude float* Longitude in degrees. *
* @return array array on success&return.falseforfailure;. */ function date_sun_info ($time, $latitude, $longitude) {} define ('DATE_ATOM', "Y-m-d\TH:i:sP"); define ('DATE_COOKIE', "l, d-M-Y H:i:s T"); define ('DATE_ISO8601', "Y-m-d\TH:i:sO"); define ('DATE_RFC822', "D, d M y H:i:s O"); define ('DATE_RFC850', "l, d-M-y H:i:s T"); define ('DATE_RFC1036', "D, d M y H:i:s O"); define ('DATE_RFC1123', "D, d M Y H:i:s O"); define ('DATE_RFC2822', "D, d M Y H:i:s O"); define ('DATE_RFC3339', "Y-m-d\TH:i:sP"); define ('DATE_RSS', "D, d M Y H:i:s O"); define ('DATE_W3C', "Y-m-d\TH:i:sP"); /** * Timestamp * @link http://www.php.net/manual/en/datetime.constants.php */ define ('SUNFUNCS_RET_TIMESTAMP', 0); /** * Hours:minutes (example: 08:02) * @link http://www.php.net/manual/en/datetime.constants.php */ define ('SUNFUNCS_RET_STRING', 1); /** * Hours as floating point number (example 8.75) * @link http://www.php.net/manual/en/datetime.constants.php */ define ('SUNFUNCS_RET_DOUBLE', 2); // End of date v.5.6.0 ?>