Skip to content

Commit

Permalink
[PHP 8.4] Add ext-date constant types
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandre-daubois committed Dec 3, 2024
1 parent 0e48683 commit a6276c1
Show file tree
Hide file tree
Showing 5 changed files with 163 additions and 31 deletions.
16 changes: 14 additions & 2 deletions reference/datetime/dateperiod.xml
Original file line number Diff line number Diff line change
Expand Up @@ -109,14 +109,20 @@
&reftitle.constants;
<variablelist>
<varlistentry xml:id="dateperiod.constants.exclude-start-date">
<term><constant>DatePeriod::EXCLUDE_START_DATE</constant></term>
<term>
<constant>DatePeriod::EXCLUDE_START_DATE</constant>
<type>int</type>
</term>
<listitem>
<para>Exclude start date, used in <function>DatePeriod::__construct</function>.</para>
</listitem>
</varlistentry>

<varlistentry xml:id="dateperiod.constants.include-end-date">
<term><constant>DatePeriod::INCLUDE_END_DATE</constant></term>
<term>
<constant>DatePeriod::INCLUDE_END_DATE</constant>
<type>int</type>
</term>
<listitem>
<para>Include end date, used in <function>DatePeriod::__construct</function>.</para>
</listitem>
Expand Down Expand Up @@ -257,6 +263,12 @@ echo $period->recurrences, "\n";
</row>
</thead>
<tbody>
<row>
<entry>8.4.0</entry>
<entry>
The class constants are now typed.
</entry>
</row>
<row>
<entry>8.2.0</entry>
<entry>
Expand Down
6 changes: 6 additions & 0 deletions reference/datetime/datetime.xml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,12 @@
</row>
</thead>
<tbody>
<row>
<entry>8.4.0</entry>
<entry>
The class constants are now typed.
</entry>
</row>
<row>
<entry>7.2.0</entry>
<entry>
Expand Down
6 changes: 6 additions & 0 deletions reference/datetime/datetimeimmutable.xml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,12 @@
</row>
</thead>
<tbody>
<row>
<entry>8.4.0</entry>
<entry>
The class constants are now typed.
</entry>
</row>
<row>
<entry>7.1.0</entry>
<entry>
Expand Down
74 changes: 60 additions & 14 deletions reference/datetime/datetimeinterface.xml
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,10 @@
&reftitle.constants;
<variablelist>
<varlistentry xml:id="datetimeinterface.constants.atom">
<term><constant>DateTimeInterface::ATOM</constant></term>
<term>
<constant>DateTimeInterface::ATOM</constant>
<type>string</type>
</term>
<term><constant>DATE_ATOM</constant></term>
<listitem>
<simpara>
Expand All @@ -161,7 +164,10 @@
</varlistentry>

<varlistentry xml:id="datetimeinterface.constants.cookie">
<term><constant>DateTimeInterface::COOKIE</constant></term>
<term>
<constant>DateTimeInterface::COOKIE</constant>
<type>string</type>
</term>
<term><constant>DATE_COOKIE</constant></term>
<listitem>
<simpara>
Expand All @@ -171,7 +177,10 @@
</varlistentry>

<varlistentry xml:id="datetimeinterface.constants.iso8601">
<term><constant>DateTimeInterface::ISO8601</constant></term>
<term>
<constant>DateTimeInterface::ISO8601</constant>
<type>string</type>
</term>
<term><constant>DATE_ISO8601</constant></term>
<listitem>
<simpara>
Expand All @@ -190,7 +199,10 @@
</varlistentry>

<varlistentry xml:id="datetimeinterface.constants.iso8601-expanded">
<term><constant>DateTimeInterface::ISO8601_EXPANDED</constant></term>
<term>
<constant>DateTimeInterface::ISO8601_EXPANDED</constant>
<type>string</type>
</term>
<term><constant>DATE_ISO8601_EXPANDED</constant></term>
<listitem>
<simpara>
Expand All @@ -208,7 +220,10 @@
</varlistentry>

<varlistentry xml:id="datetimeinterface.constants.rfc822">
<term><constant>DateTimeInterface::RFC822</constant></term>
<term>
<constant>DateTimeInterface::RFC822</constant>
<type>string</type>
</term>
<term><constant>DATE_RFC822</constant></term>
<listitem>
<simpara>
Expand All @@ -218,7 +233,10 @@
</varlistentry>

<varlistentry xml:id="datetimeinterface.constants.rfc850">
<term><constant>DateTimeInterface::RFC850</constant></term>
<term>
<constant>DateTimeInterface::RFC850</constant>
<type>string</type>
</term>
<term><constant>DATE_RFC850</constant></term>
<listitem>
<simpara>
Expand All @@ -228,7 +246,10 @@
</varlistentry>

<varlistentry xml:id="datetimeinterface.constants.rfc1036">
<term><constant>DateTimeInterface::RFC1036</constant></term>
<term>
<constant>DateTimeInterface::RFC1036</constant>
<type>string</type>
</term>
<term><constant>DATE_RFC1036</constant></term>
<listitem>
<simpara>
Expand All @@ -238,7 +259,10 @@
</varlistentry>

<varlistentry xml:id="datetimeinterface.constants.rfc1123">
<term><constant>DateTimeInterface::RFC1123</constant></term>
<term>
<constant>DateTimeInterface::RFC1123</constant>
<type>string</type>
</term>
<term><constant>DATE_RFC1123</constant></term>
<listitem>
<simpara>
Expand All @@ -248,7 +272,10 @@
</varlistentry>

<varlistentry xml:id="datetimeinterface.constants.rfc7231">
<term><constant>DateTimeInterface::RFC7231</constant></term>
<term>
<constant>DateTimeInterface::RFC7231</constant>
<type>string</type>
</term>
<term><constant>DATE_RFC7231</constant></term>
<listitem>
<simpara>
Expand All @@ -258,7 +285,10 @@
</varlistentry>

<varlistentry xml:id="datetimeinterface.constants.rfc2822">
<term><constant>DateTimeInterface::RFC2822</constant></term>
<term>
<constant>DateTimeInterface::RFC2822</constant>
<type>string</type>
</term>
<term><constant>DATE_RFC2822</constant></term>
<listitem>
<simpara>
Expand All @@ -268,7 +298,10 @@
</varlistentry>

<varlistentry xml:id="datetimeinterface.constants.rfc3339">
<term><constant>DateTimeInterface::RFC3339</constant></term>
<term>
<constant>DateTimeInterface::RFC3339</constant>
<type>string</type>
</term>
<term><constant>DATE_RFC3339</constant></term>
<listitem>
<simpara>
Expand All @@ -278,7 +311,10 @@
</varlistentry>

<varlistentry xml:id="datetimeinterface.constants.rfc3339-extended">
<term><constant>DateTimeInterface::RFC3339_EXTENDED</constant></term>
<term>
<constant>DateTimeInterface::RFC3339_EXTENDED</constant>
<type>string</type>
</term>
<term><constant>DATE_RFC3339_EXTENDED</constant></term>
<listitem>
<simpara>
Expand All @@ -288,7 +324,10 @@
</varlistentry>

<varlistentry xml:id="datetimeinterface.constants.rss">
<term><constant>DateTimeInterface::RSS</constant></term>
<term>
<constant>DateTimeInterface::RSS</constant>
<type>string</type>
</term>
<term><constant>DATE_RSS</constant></term>
<listitem>
<simpara>
Expand All @@ -298,7 +337,10 @@
</varlistentry>

<varlistentry xml:id="datetimeinterface.constants.w3c">
<term><constant>DateTimeInterface::W3C</constant></term>
<term>
<constant>DateTimeInterface::W3C</constant>
<type>string</type>
</term>
<term><constant>DATE_W3C</constant></term>
<listitem>
<simpara>
Expand All @@ -323,6 +365,10 @@
</row>
</thead>
<tbody>
<row>
<entry>8.4.0</entry>
<entry>The class constants are now typed.</entry>
</row>
<row>
<entry>8.2.0</entry>
<entry>
Expand Down
Loading

0 comments on commit a6276c1

Please sign in to comment.