svn: /phpdoc/fr/trunk/reference/ datetime/datetime/construct.xml datetime/datetime/createfromformat.xml datetime/datetime/gettimestamp.xml
datetime/datetime/modify.xml datetime/datetime/settimestamp.xml pcre/pattern.syntax.xml
| From: | Pierrick Charron | Date: | Wed, 05 May 2010 21:17:57 +0000 |
| Subject: | svn: /phpdoc/fr/trunk/reference/ datetime/datetime/construct.xml datetime/datetime/createfromformat.xml datetime/datetime/gettimestamp.xml datetime/datetime/modify.xml datetime/datetime/settimestamp.xml pcre/pattern.syntax.xml |
||
| Groups: | php.doc.fr | ||
| Request: | Send a blank email to doc-fr+get-7955@lists.php.net to get a copy of this message | ||
pierrick Wed, 05 May 2010 21:17:57 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=299034
Log:
Sync with EN
Changed paths:
U phpdoc/fr/trunk/reference/datetime/datetime/construct.xml
U phpdoc/fr/trunk/reference/datetime/datetime/createfromformat.xml
U phpdoc/fr/trunk/reference/datetime/datetime/gettimestamp.xml
U phpdoc/fr/trunk/reference/datetime/datetime/modify.xml
U phpdoc/fr/trunk/reference/datetime/datetime/settimestamp.xml
U phpdoc/fr/trunk/reference/pcre/pattern.syntax.xml
Modified: phpdoc/fr/trunk/reference/datetime/datetime/construct.xml
===================================================================
--- phpdoc/fr/trunk/reference/datetime/datetime/construct.xml 2010-05-05 20:57:06 UTC (rev 299033)
+++ phpdoc/fr/trunk/reference/datetime/datetime/construct.xml 2010-05-05 21:17:57 UTC (rev 299034)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
-<!-- EN-Revision: 298981 Maintainer: jpauli Status: ready -->
+<!-- EN-Revision: 299010 Maintainer: jpauli Status: ready -->
<!-- Reviewed: yes -->
<refentry xml:id="datetime.construct" xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink">
@@ -95,7 +95,13 @@
<programlisting role="php">
<![CDATA[
<?php
-$date = new DateTime('2000-01-01');
+try {
+ $date = new DateTime('2000-01-01');
+} catch (Exception $e) {
+ echo $e->getMessage();
+ exit(1);
+}
+
echo $date->format('Y-m-d');
?>
]]>
@@ -105,6 +111,14 @@
<![CDATA[
<?php
$date = date_create('2000-01-01');
+if (!$date) {
+ $e = date_get_last_errors();
+ foreach ($e['errors'] as $error) {
+ echo "$error\n";
+ }
+ exit(1);
+}
+
echo date_format($date, 'Y-m-d');
?>
]]>
@@ -140,6 +154,10 @@
// Utilisation d'un timestamp Unix. Notez que le résultat est dans le fuseau UTC.
$date = new DateTime('@946684800');
echo $date->format('Y-m-d H:i:sP') . "\n";
+
+// Valeur non existante
+$date = new DateTime('2000-02-30');
+echo $date->format('Y-m-d H:i:sP') . "\n";
?>
]]>
</programlisting>
@@ -151,6 +169,7 @@
2010-04-24 10:24:16-04:00
2010-04-25 02:24:16+12:00
2000-01-01 00:00:00+00:00
+2000-03-01 00:00:00-05:00
]]>
</screen>
</example>
@@ -163,6 +182,7 @@
<member><function>DateTimeZone::__construct</function></member>
<member>Paramètre ini <link
linkend="ini.date.timezone">date.timezone</link></member>
<member><function>date_default_timezone_set</function></member>
+ <member><function>DateTime::getLastErrors</function></member>
</simplelist>
</refsect1>
</refentry>
Modified: phpdoc/fr/trunk/reference/datetime/datetime/createfromformat.xml
===================================================================
--- phpdoc/fr/trunk/reference/datetime/datetime/createfromformat.xml 2010-05-05 20:57:06 UTC (rev
299033)
+++ phpdoc/fr/trunk/reference/datetime/datetime/createfromformat.xml 2010-05-05 21:17:57 UTC (rev
299034)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
-<!-- EN-Revision: 298982 Maintainer: jpauli Status: ready -->
+<!-- EN-Revision: 299003 Maintainer: jpauli Status: ready -->
<!-- Reviewed: yes -->
<refentry xml:id="datetime.createfromformat" xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink">
@@ -159,8 +159,8 @@
<refsect1 role="seealso">
&reftitle.seealso;
<simplelist>
- <member><methodname>DateTime::__construct</methodname></member>
- <member><methodname>DateTime::getLastErrors</methodname></member>
+ <member><function>DateTime::__construct</function></member>
+ <member><function>DateTime::getLastErrors</function></member>
</simplelist>
</refsect1>
</refentry>
Modified: phpdoc/fr/trunk/reference/datetime/datetime/gettimestamp.xml
===================================================================
--- phpdoc/fr/trunk/reference/datetime/datetime/gettimestamp.xml 2010-05-05 20:57:06 UTC (rev
299033)
+++ phpdoc/fr/trunk/reference/datetime/datetime/gettimestamp.xml 2010-05-05 21:17:57 UTC (rev
299034)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
-<!-- EN-Revision: 298982 Maintainer: jpauli Status: ready -->
+<!-- EN-Revision: 299003 Maintainer: jpauli Status: ready -->
<!-- Reviewed: no -->
<refentry xml:id="datetime.gettimestamp" xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink">
@@ -81,8 +81,8 @@
<refsect1 role="seealso">
&reftitle.seealso;
<simplelist>
- <member><methodname>DateTime::setTimestamp</methodname></member>
- <member><methodname>DateTime::format</methodname></member>
+ <member><function>DateTime::setTimestamp</function></member>
+ <member><function>DateTime::format</function></member>
</simplelist>
</refsect1>
Modified: phpdoc/fr/trunk/reference/datetime/datetime/modify.xml
===================================================================
--- phpdoc/fr/trunk/reference/datetime/datetime/modify.xml 2010-05-05 20:57:06 UTC (rev 299033)
+++ phpdoc/fr/trunk/reference/datetime/datetime/modify.xml 2010-05-05 21:17:57 UTC (rev 299034)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
-<!-- EN-Revision: 298971 Maintainer: jpauli Status: ready -->
+<!-- EN-Revision: 299008 Maintainer: jpauli Status: ready -->
<!-- Reviewed: yes -->
<refentry xml:id="datetime.modify" xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink">
@@ -99,6 +99,29 @@
]]>
</screen>
</example>
+ <example>
+ <title>Méfiez-vous lors de l'ajout ou la soustraction de mois</title>
+ <programlisting role="php">
+<![CDATA[
+<?php
+$date = new DateTime('2000-12-31');
+
+$date->modify('+1 month');
+echo $date->format('Y-m-d') . "\n";
+
+$date->modify('+1 month');
+echo $date->format('Y-m-d') . "\n";
+?>
+]]>
+ </programlisting>
+ &example.outputs;
+ <screen>
+<![CDATA[
+2001-01-31
+2001-03-03
+]]>
+ </screen>
+ </example>
</refsect1>
<refsect1 role="seealso">
Modified: phpdoc/fr/trunk/reference/datetime/datetime/settimestamp.xml
===================================================================
--- phpdoc/fr/trunk/reference/datetime/datetime/settimestamp.xml 2010-05-05 20:57:06 UTC (rev
299033)
+++ phpdoc/fr/trunk/reference/datetime/datetime/settimestamp.xml 2010-05-05 21:17:57 UTC (rev
299034)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
-<!-- EN-Revision: 298971 Maintainer: jpauli Status: ready -->
+<!-- EN-Revision: 299003 Maintainer: jpauli Status: ready -->
<!-- Reviewed: yes -->
<refentry xml:id="datetime.settimestamp" xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink">
@@ -98,7 +98,7 @@
<refsect1 role="seealso">
&reftitle.seealso;
<simplelist>
- <member><methodname>DateTime::getTimestamp</methodname></member>
+ <member><function>DateTime::getTimestamp</function></member>
</simplelist>
</refsect1>
Modified: phpdoc/fr/trunk/reference/pcre/pattern.syntax.xml
===================================================================
--- phpdoc/fr/trunk/reference/pcre/pattern.syntax.xml 2010-05-05 20:57:06 UTC (rev 299033)
+++ phpdoc/fr/trunk/reference/pcre/pattern.syntax.xml 2010-05-05 21:17:57 UTC (rev 299034)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
-<!-- EN-Revision: 297028 Maintainer: yannick Status: ready -->
+<!-- EN-Revision: 299033 Maintainer: yannick Status: ready -->
<!-- Reviewed: yes -->
<chapter xml:id="reference.pcre.pattern.syntax" xmlns="http://docbook.org/ns/docbook">
@@ -1514,10 +1514,10 @@
<literal>"Samedi"</literal>.
</para>
<para>
- Il est possible de nommer le sous-masque avec
- <literal>(?P<name>pattern)</literal> depuis PHP 4.3.3.
- Les tableaux avec les masques doivent contenir le masque indexé par la
- chaîne à côté le masque indexé par le numéro.
+ A partir de PHP 4.3.3, il est possible de nommer un sous masque
+ en utilisant la syntaxe <literal>(?P<name>pattern)</literal>. Ce sous
+ masque sera alors indexé dans le tableau de concordance par sa position, ainsi
+ que par son nom.
</para>
</section>