Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PHP 8.4] Add ext-date constant types #4237

Merged
merged 1 commit into from
Dec 3, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions reference/datetime/dateperiod.xml
Original file line number Diff line number Diff line change
@@ -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>
@@ -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>
6 changes: 6 additions & 0 deletions reference/datetime/datetime.xml
Original file line number Diff line number Diff line change
@@ -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>
6 changes: 6 additions & 0 deletions reference/datetime/datetimeimmutable.xml
Original file line number Diff line number Diff line change
@@ -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>
74 changes: 60 additions & 14 deletions reference/datetime/datetimeinterface.xml
Original file line number Diff line number Diff line change
@@ -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>
@@ -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>
@@ -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>
@@ -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>
@@ -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>
@@ -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>
@@ -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>
@@ -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>
@@ -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>
@@ -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>
@@ -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>
@@ -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>
@@ -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>
@@ -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>
@@ -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>
92 changes: 77 additions & 15 deletions reference/datetime/datetimezone.xml
Original file line number Diff line number Diff line change
@@ -128,98 +128,140 @@
&reftitle.constants;
<variablelist>
<varlistentry xml:id="datetimezone.constants.africa">
<term><constant>DateTimeZone::AFRICA</constant></term>
<term>
<constant>DateTimeZone::AFRICA</constant>
<type>int</type>
</term>
<listitem>
<para>Africa time zones.</para>
</listitem>
</varlistentry>

<varlistentry xml:id="datetimezone.constants.america">
<term><constant>DateTimeZone::AMERICA</constant></term>
<term>
<constant>DateTimeZone::AMERICA</constant>
<type>int</type>
</term>
<listitem>
<para>America time zones.</para>
</listitem>
</varlistentry>

<varlistentry xml:id="datetimezone.constants.antarctica">
<term><constant>DateTimeZone::ANTARCTICA</constant></term>
<term>
<constant>DateTimeZone::ANTARCTICA</constant>
<type>int</type>
</term>
<listitem>
<para>Antarctica time zones.</para>
</listitem>
</varlistentry>

<varlistentry xml:id="datetimezone.constants.arctic">
<term><constant>DateTimeZone::ARCTIC</constant></term>
<term>
<constant>DateTimeZone::ARCTIC</constant>
<type>int</type>
</term>
<listitem>
<para>Arctic time zones.</para>
</listitem>
</varlistentry>

<varlistentry xml:id="datetimezone.constants.asia">
<term><constant>DateTimeZone::ASIA</constant></term>
<term>
<constant>DateTimeZone::ASIA</constant>
<type>int</type>
</term>
<listitem>
<para>Asia time zones.</para>
</listitem>
</varlistentry>

<varlistentry xml:id="datetimezone.constants.atlantic">
<term><constant>DateTimeZone::ATLANTIC</constant></term>
<term>
<constant>DateTimeZone::ATLANTIC</constant>
<type>int</type>
</term>
<listitem>
<para>Atlantic time zones.</para>
</listitem>
</varlistentry>

<varlistentry xml:id="datetimezone.constants.australia">
<term><constant>DateTimeZone::AUSTRALIA</constant></term>
<term>
<constant>DateTimeZone::AUSTRALIA</constant>
<type>int</type>
</term>
<listitem>
<para>Australia time zones.</para>
</listitem>
</varlistentry>

<varlistentry xml:id="datetimezone.constants.europe">
<term><constant>DateTimeZone::EUROPE</constant></term>
<term>
<constant>DateTimeZone::EUROPE</constant>
<type>int</type>
</term>
<listitem>
<para>Europe time zones.</para>
</listitem>
</varlistentry>

<varlistentry xml:id="datetimezone.constants.indian">
<term><constant>DateTimeZone::INDIAN</constant></term>
<term>
<constant>DateTimeZone::INDIAN</constant>
<type>int</type>
</term>
<listitem>
<para>Indian time zones.</para>
</listitem>
</varlistentry>

<varlistentry xml:id="datetimezone.constants.pacific">
<term><constant>DateTimeZone::PACIFIC</constant></term>
<term>
<constant>DateTimeZone::PACIFIC</constant>
<type>int</type>
</term>
<listitem>
<para>Pacific time zones.</para>
</listitem>
</varlistentry>

<varlistentry xml:id="datetimezone.constants.utc">
<term><constant>DateTimeZone::UTC</constant></term>
<term>
<constant>DateTimeZone::UTC</constant>
<type>int</type>
</term>
<listitem>
<para>UTC time zones.</para>
</listitem>
</varlistentry>

<varlistentry xml:id="datetimezone.constants.all">
<term><constant>DateTimeZone::ALL</constant></term>
<term>
<constant>DateTimeZone::ALL</constant>
<type>int</type>
</term>
<listitem>
<para>All time zones.</para>
</listitem>
</varlistentry>

<varlistentry xml:id="datetimezone.constants.all-with-bc">
<term><constant>DateTimeZone::ALL_WITH_BC</constant></term>
<term>
<constant>DateTimeZone::ALL_WITH_BC</constant>
<type>int</type>
</term>
<listitem>
<para>All time zones including backwards compatible.</para>
</listitem>
</varlistentry>

<varlistentry xml:id="datetimezone.constants.per-country">
<term><constant>DateTimeZone::PER_COUNTRY</constant></term>
<term>
<constant>DateTimeZone::PER_COUNTRY</constant>
<type>int</type>
</term>
<listitem>
<para>Time zones per country.</para>
</listitem>
@@ -228,7 +270,27 @@
</variablelist>
</section>
<!-- }}} -->

<section role="changelog" xml:id="datetimezone.changelog">
&reftitle.changelog;
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>8.4.0</entry>
<entry>
The class constants are now typed.
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</section>

</partintro>