mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 08:58:56 +00:00
add the new date constants.
deprecate is_dst parameter document the new date() format chars git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@191888 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
3bef9a020b
commit
a77c2d3d0f
6 changed files with 193 additions and 18 deletions
143
reference/datetime/constants.xml
Executable file
143
reference/datetime/constants.xml
Executable file
|
@ -0,0 +1,143 @@
|
|||
<?xml version='1.0' encoding='iso-8859-1'?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
<section id="datetime.constants">
|
||||
&reftitle.constants;
|
||||
<para>
|
||||
The following constants are defined since PHP 5.1.0 and they offer standard
|
||||
date representations, which can be used along with the date format functions
|
||||
(like <function>date</function> or <function>strftime</function>).
|
||||
</para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>DATE_ATOM</constant>
|
||||
(<type>string</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
Atom
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>DATE_COOKIE</constant>
|
||||
(<type>string</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
HTTP Cookies
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>DATE_ISO8601</constant>
|
||||
(<type>string</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
ISO-8601
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>DATE_RFC822</constant>
|
||||
(<type>string</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
RFC 822
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>DATE_RFC850</constant>
|
||||
(<type>string</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
RFC 850
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>DATE_RFC1036</constant>
|
||||
(<type>string</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
RFC 1036
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>DATE_RFC1123</constant>
|
||||
(<type>string</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
RFC 1123
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>DATE_RFC2822</constant>
|
||||
(<type>string</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
RFC 2822
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>DATE_RSS</constant>
|
||||
(<type>string</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
RSS
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<constant>DATE_W3C</constant>
|
||||
(<type>string</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
World Wide Web Consortium (W3C)
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</section>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-omittag:t
|
||||
sgml-shorttag:t
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-indent-step:1
|
||||
sgml-indent-data:t
|
||||
indent-tabs-mode:nil
|
||||
sgml-parent-document:nil
|
||||
sgml-default-dtd-file:"../../../../manual.ced"
|
||||
sgml-exposed-tags:nil
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
End:
|
||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.18 $ -->
|
||||
<!-- $Revision: 1.19 $ -->
|
||||
<!-- splitted from ./en/functions/datetime.xml, last change in rev 1.2 -->
|
||||
<refentry id="function.date">
|
||||
<refnamediv>
|
||||
|
@ -143,6 +143,14 @@
|
|||
<entry>Whether it's a leap year</entry>
|
||||
<entry><literal>1</literal> if it is a leap year, <literal>0</literal> otherwise.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><literal>o</literal></entry>
|
||||
<entry>ISO-8601 year number. This has the same value as
|
||||
<literal>Y</literal>, except that if the ISO week number
|
||||
(<literal>W</literal>) belongs to the previous or next year, that year
|
||||
is used instead. (added in PHP 5.1.0)</entry>
|
||||
<entry>Examples: <literal>1999</literal> or <literal>2003</literal></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><literal>Y</literal></entry>
|
||||
<entry>A full numeric representation of a year, 4 digits</entry>
|
||||
|
@ -208,6 +216,11 @@
|
|||
<entry>---</entry>
|
||||
<entry>---</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><literal>e</literal></entry>
|
||||
<entry>Timezone identifier (added in PHP 5.1.0)</entry>
|
||||
<entry>Examples: <literal>UTC</literal>, <literal>GMT</literal>, <literal>Atlantic/Azores</literal></entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><literal>I</literal> (capital i)</entry>
|
||||
<entry>Whether or not the date is in daylights savings time</entry>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.8 $ -->
|
||||
<!-- $Revision: 1.9 $ -->
|
||||
<!-- splitted from ./en/functions/datetime.xml, last change in rev 1.2 -->
|
||||
<refentry id="function.gmmktime">
|
||||
<refnamediv>
|
||||
|
@ -31,6 +31,13 @@
|
|||
from right to left, with any omitted arguments being set to the
|
||||
current corresponding GMT value.
|
||||
</para>
|
||||
<note>
|
||||
<para>
|
||||
As of PHP 5.1.0, the <parameter>is_dst</parameter> parameter became
|
||||
deprecated. As a result, the new timezone handling features should be used
|
||||
instead.
|
||||
</para>
|
||||
</note>
|
||||
<para>
|
||||
<note>
|
||||
<simpara>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.17 $ -->
|
||||
<!-- $Revision: 1.18 $ -->
|
||||
<!-- splitted from ./en/functions/datetime.xml, last change in rev 1.2 -->
|
||||
<refentry id="function.mktime">
|
||||
<refnamediv>
|
||||
|
@ -81,10 +81,11 @@
|
|||
<listitem>
|
||||
<para>
|
||||
The number of the year, may be a two or four digit value,
|
||||
with values between 0-69 mapping to 2000-2069 and 70-99 to
|
||||
1970-1999 (on systems where time_t is a 32bit signed integer, as
|
||||
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 <parameter>year</parameter>
|
||||
is somewhere between 1901 and 2038).
|
||||
is somewhere between 1901 and 2038, although this limitation is
|
||||
overcome as of PHP 5.1.0.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
@ -103,6 +104,12 @@
|
|||
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.
|
||||
</para>
|
||||
<note>
|
||||
<para>
|
||||
As of PHP 5.1.0, this parameter became deprecated. As a result, the
|
||||
new timezone handling features should be used instead.
|
||||
</para>
|
||||
</note>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
|
@ -136,6 +143,10 @@
|
|||
<entry>3.0.10</entry>
|
||||
<entry>Added <parameter>is_dst</parameter> parameter</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>5.1.0</entry>
|
||||
<entry>the <parameter>is_dst</parameter> parameter became deprecated</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</informaltable>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.14 $ -->
|
||||
<!-- $Revision: 1.15 $ -->
|
||||
<!-- splitted from ./en/functions/datetime.xml, last change in rev 1.8 -->
|
||||
<refentry id="function.strtotime">
|
||||
<refnamediv>
|
||||
|
@ -22,11 +22,17 @@
|
|||
</simpara>
|
||||
<para>
|
||||
This function will use the <envar>TZ</envar> environment variable (if
|
||||
available) to calculate the timestamp. Since PHP 5.1.0 and if the
|
||||
<envar>TZ</envar> variable isn't set, the <link
|
||||
linkend="ini.date.timezone">date.timezone</link> ini configuration option
|
||||
will be used. If none of these are available, "GMT" is assumed.
|
||||
available) to calculate the timestamp. Since PHP 5.1.0 there are easier
|
||||
ways to define the timezone that is used across all date/time functions.
|
||||
That process is explained in the
|
||||
<function>date_default_timezone_get</function> function page.
|
||||
</para>
|
||||
<note>
|
||||
<para>
|
||||
If the number of the year is specified in a two digit format, the values
|
||||
between 0-69 are mapped to 2000-2069 and 70-100 to 1970-2000.
|
||||
</para>
|
||||
</note>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
|
@ -79,8 +85,6 @@
|
|||
<entry>5.1.0</entry>
|
||||
<entry>
|
||||
It now returns &false; on failure, instead of <literal>-1</literal>.
|
||||
Added the <link linkend="ini.date.timezone">date.timezone</link> ini
|
||||
option.
|
||||
</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.8 $ -->
|
||||
<!-- $Revision: 1.9 $ -->
|
||||
<reference id="ref.datetime">
|
||||
<title>Date and Time Functions</title>
|
||||
<titleabbrev>Date/Time</titleabbrev>
|
||||
|
@ -47,10 +47,7 @@
|
|||
&no.resource;
|
||||
</section>
|
||||
|
||||
<section id="datetime.constants">
|
||||
&reftitle.constants;
|
||||
&no.constants;
|
||||
</section>
|
||||
&reference.datetime.constants;
|
||||
|
||||
</partintro>
|
||||
|
||||
|
|
Loading…
Reference in a new issue