[skip-revcheck] Use spaces instead of tabs for indentation

This commit is contained in:
George Peter Banyard 2022-06-04 17:02:08 +01:00
parent c613965f9a
commit e8fb9384ca

View file

@ -22,48 +22,48 @@
<para>
A general set of rules should be taken into account.
</para>
<orderedlist>
<listitem>
<simpara>
The parser, allows for each unit (year, month, day, hour, minute, second)
the full range of values. For a year that's just 4 digits, for a month
that's 0-12, day is 0-31 and for hour and minute it's 0-59.
</simpara>
</listitem>
<listitem>
<simpara>
60 is allowed for seconds, as sometimes date strings with that
leapsecond do show up. But PHP implements Unix time where "60" is not
a valid second number and hence it overflows.
</simpara>
</listitem>
<listitem>
<simpara>
<orderedlist>
<listitem>
<simpara>
The parser, allows for each unit (year, month, day, hour, minute, second)
the full range of values. For a year that's just 4 digits, for a month
that's 0-12, day is 0-31 and for hour and minute it's 0-59.
</simpara>
</listitem>
<listitem>
<simpara>
60 is allowed for seconds, as sometimes date strings with that
leapsecond do show up. But PHP implements Unix time where "60" is not
a valid second number and hence it overflows.
</simpara>
</listitem>
<listitem>
<simpara>
<function>strtotime</function> returns &false; if any number is outside of
the ranges, and <function>DateTimeImmutable::__construct</function> throws
an exception.
</simpara>
</listitem>
<listitem>
<simpara>
If a string contains a date, all time elements are reset to 0.
</simpara>
</listitem>
<listitem>
<simpara>
All less-significant time elements are reset to 0 if any part of a time is
present in the given string.
</simpara>
</listitem>
<listitem>
<simpara>
The parser is dumb, and doesn't do any checks to make it faster (and
more generic).
</simpara>
</listitem>
<listitem>
<para>
There is an additional check if an invalid date is provided:
</simpara>
</listitem>
<listitem>
<simpara>
If a string contains a date, all time elements are reset to 0.
</simpara>
</listitem>
<listitem>
<simpara>
All less-significant time elements are reset to 0 if any part of a time is
present in the given string.
</simpara>
</listitem>
<listitem>
<simpara>
The parser is dumb, and doesn't do any checks to make it faster (and
more generic).
</simpara>
</listitem>
<listitem>
<para>
There is an additional check if an invalid date is provided:
<example>
<programlisting role="php">
<![CDATA[
@ -83,11 +83,11 @@ array(1) {
]]>
</screen>
</example>
</para>
</listitem>
<listitem>
<para>
It is already possible to handle the edge cases, but then
</para>
</listitem>
<listitem>
<para>
It is already possible to handle the edge cases, but then
<function>DateTimeImmutable::createFromFormat</function> must be used
while supplying the correct format.
<example>
@ -112,9 +112,9 @@ class DateTime#1 (3) {
]]>
</screen>
</example>
</para>
</listitem>
</orderedlist>
</para>
</listitem>
</orderedlist>
<!--Time Formats: {{{-->
<sect1 xml:id="datetime.formats.time">