From e8fb9384ca14cf3329389d435fd8625515e95eee Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Sat, 4 Jun 2022 17:02:08 +0100 Subject: [PATCH] [skip-revcheck] Use spaces instead of tabs for indentation --- reference/datetime/formats.xml | 94 +++++++++++++++++----------------- 1 file changed, 47 insertions(+), 47 deletions(-) diff --git a/reference/datetime/formats.xml b/reference/datetime/formats.xml index a946e4424f..ceb1c1b3fd 100644 --- a/reference/datetime/formats.xml +++ b/reference/datetime/formats.xml @@ -22,48 +22,48 @@ A general set of rules should be taken into account. - - - - 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. - - - - - 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. - - - - + + + + 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. + + + + + 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. + + + + strtotime returns &false; if any number is outside of the ranges, and DateTimeImmutable::__construct throws an exception. - - - - - If a string contains a date, all time elements are reset to 0. - - - - - All less-significant time elements are reset to 0 if any part of a time is - present in the given string. - - - - - The parser is dumb, and doesn't do any checks to make it faster (and - more generic). - - - - - There is an additional check if an invalid date is provided: + + + + + If a string contains a date, all time elements are reset to 0. + + + + + All less-significant time elements are reset to 0 if any part of a time is + present in the given string. + + + + + The parser is dumb, and doesn't do any checks to make it faster (and + more generic). + + + + + There is an additional check if an invalid date is provided: - - - - - It is already possible to handle the edge cases, but then + + + + + It is already possible to handle the edge cases, but then DateTimeImmutable::createFromFormat must be used while supplying the correct format. @@ -112,9 +112,9 @@ class DateTime#1 (3) { ]]> - - - + + +