com doc/ja: DatePeriod::__construct() no longer accepts 0 $recurrences: reference/datetime/datep eriod/construct.xml

[email protected] (Yoshinari Takaoka) Wed, 13 Jan 2021 16:47:41 +0000
Newsgroups php.doc.ja
Message-ID <[email protected]>
Commit:    cca7660f3ca0ace5c082e4308f200c0bae741010
Author:    Yoshinari Takaoka <[email protected]>         Thu, 14 Jan 2021 01:47:41 +0900
Parents:   5ea83a7c4cbd456add77dab6ef891e4c15a571db
Branches:  master

Link:       http://git.php.net/?p=doc/ja.git;a=commitdiff;h=cca7660f3ca0ace5c082e4308f200c0bae741010

Log:
DatePeriod::__construct() no longer accepts 0 $recurrences

Cf. <https://bugs.php.net/bug.php?id=78590>.

We also document the default value of `$options`, and remove the PHP 5
related changelog entries.

Changed paths:
  M  reference/datetime/dateperiod/construct.xml


Diff:
diff --git a/reference/datetime/dateperiod/construct.xml b/reference/datetime/dateperiod/construct.xml
index 6879481814..d3a5b49793 100644
--- a/reference/datetime/dateperiod/construct.xml
+++ b/reference/datetime/dateperiod/construct.xml
@@ -1,6 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!-- $Revision$ -->
-<!-- EN-Revision: 85a0f924337aa29b61018828b1292a12e796f288 Maintainer: takagi Status: ready -->
+<!-- EN-Revision: a626743ba6f7c4a3c8f1e192ee2f888035b7fe7f Maintainer: takagi Status: ready -->
+<!-- Credits: mumumu -->
 
 <refentry xml:id="dateperiod.construct" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
  <refnamediv>
@@ -15,19 +16,19 @@
    <methodparam><type>DateTimeInterface</type><parameter>start</parameter></methodparam>
    <methodparam><type>DateInterval</type><parameter>interval</parameter></methodparam>
    <methodparam><type>int</type><parameter>recurrences</parameter></methodparam>
-   <methodparam choice="opt"><type>int</type><parameter>options</parameter></methodparam>
+   <methodparam choice="opt"><type>int</type><parameter>options</parameter><initializer>0</initializer></methodparam>
   </constructorsynopsis>
   <constructorsynopsis role="oop">
    <modifier>public</modifier> <methodname>DatePeriod::__construct</methodname>
    <methodparam><type>DateTimeInterface</type><parameter>start</parameter></methodparam>
    <methodparam><type>DateInterval</type><parameter>interval</parameter></methodparam>
    <methodparam><type>DateTimeInterface</type><parameter>end</parameter></methodparam>
-   <methodparam choice="opt"><type>int</type><parameter>options</parameter></methodparam>
+   <methodparam choice="opt"><type>int</type><parameter>options</parameter><initializer>0</initializer></methodparam>
   </constructorsynopsis>
   <constructorsynopsis role="oop">
    <modifier>public</modifier> <methodname>DatePeriod::__construct</methodname>
    <methodparam><type>string</type><parameter>isostr</parameter></methodparam>
-   <methodparam choice="opt"><type>int</type><parameter>options</parameter></methodparam>
+   <methodparam choice="opt"><type>int</type><parameter>options</parameter><initializer>0</initializer></methodparam>
   </constructorsynopsis>
   <para>
    新しい DatePeriod オブジェクトを作成します。
@@ -59,6 +60,7 @@
      <listitem>
       <para>
        反復回数。
+       <literal>0</literal> より大きな値でなければいけません。
       </para>
      </listitem>
     </varlistentry>
@@ -75,6 +77,7 @@
      <listitem>
       <para>
        ISO 8601 による繰り返し間隔の指定。
+       0回の繰り返し (<literal>R0/</literal>) はサポートしていません。
       </para>
      </listitem>
     </varlistentry>
@@ -104,19 +107,9 @@
      </thead>
      <tbody>
       <row>
-       <entry>5.5.8</entry>
+       <entry>7.2.19, 7.3.6, 7.4.0</entry>
        <entry>
-        <parameter>end</parameter> の型が
-        <interfacename>DateTimeInterface</interfacename> に変わりました。
-        これより前のバージョンでは <classname>DateTime</classname> でした。
-       </entry>
-      </row>
-      <row>
-       <entry>5.5.0</entry>
-       <entry>
-        <parameter>start</parameter> の型が
-        <interfacename>DateTimeInterface</interfacename> に変わりました。
-        これより前のバージョンでは、<classname>DateTime</classname> でした。
+        <parameter>recurrences</parameter> は、<literal>0</literal> より大きな値が必須になりました。
        </entry>
       </row>
      </tbody>