Some nits to datetime docs

This commit is contained in:
George Peter Banyard 2022-06-04 16:54:21 +01:00
parent c2674e232e
commit c613965f9a

View file

@ -39,7 +39,7 @@
</listitem> </listitem>
<listitem> <listitem>
<simpara> <simpara>
<function>strtotime</function> returns false if any number is outside of <function>strtotime</function> returns &false; if any number is outside of
the ranges, and <function>DateTimeImmutable::__construct</function> throws the ranges, and <function>DateTimeImmutable::__construct</function> throws
an exception. an exception.
</simpara> </simpara>
@ -63,7 +63,7 @@
</listitem> </listitem>
<listitem> <listitem>
<para> <para>
There is an additional check if you pass in an invalid date: There is an additional check if an invalid date is provided:
<example> <example>
<programlisting role="php"> <programlisting role="php">
<![CDATA[ <![CDATA[
@ -87,9 +87,9 @@ array(1) {
</listitem> </listitem>
<listitem> <listitem>
<para> <para>
It is already possible to handle the edge cases, but then you need to use It is already possible to handle the edge cases, but then
<function>DateTimeImmutable::createFromFormat</function>, and <function>DateTimeImmutable::createFromFormat</function> must be used
supply the right format. while supplying the correct format.
<example> <example>
<programlisting role="php"> <programlisting role="php">
<![CDATA[ <![CDATA[
@ -1000,7 +1000,7 @@ class DateTime#1 (3) {
the referent is the current system timestamp. However, if used in the referent is the current system timestamp. However, if used in
<function>DateTime::modify</function> or <function>DateTime::modify</function> or
<function>DateTimeImmutable::modify</function>, the referent is the object <function>DateTimeImmutable::modify</function>, the referent is the object
on which the modify() method is called. on which the <literal>modify()</literal> method is called.
</para> </para>
</note> </note>