<li>The day <var title="">d</var> must be in the range
0 ≤ <var title="">d</var> ≤ <var title="">D</var> where <var title="">D</var> is the <a href=#number-of-days-in-month-month-of-year-year title="number of days in month month of year year">number of days
</ul><p>The rules to <dfn id=parse-a-date-string>parse a date string</dfn> are as follows. This
will either return a date, or nothing. If at any point the algorithm
says that it "fails", this means that it is aborted at that point
and returns nothing.</p>
</ol><p>The rules to <dfn id=parse-a-month-string>parse a month string</dfn> are as follows. This
will either return a year and month, or nothing. If at any point the
algorithm says that it "fails", this means that it is aborted at
that point and returns nothing.</p>
<ol><li><p>Let <var title="">input</var> be the string being
parsed.</li>
<li><p>Let <var title="">position</var> be a pointer into <var title="">input</var>, initially pointing at the start of the
string.</li>
<li><p><a href=#parse-a-date-component>Parse a date component</a> to obtain <var title="">year</var>, <var title="">month</var>, and <var title="">day</var>. If this returns nothing, then fail.</p>
<li><p><a href=#parse-a-month-component>Parse a month component</a> to obtain <var title="">year</var> and <var title="">month</var>. If this returns
nothing, then fail.</p>
<li><p>If <var title="">position</var> is <em>not</em> beyond the
end of <var title="">input</var>, then fail.</li>
<li><p>Let <var title="">date</var> be the date with year <var title="">year</var>, month <var title="">month</var>, and day <var title="">day</var>.</li>
<li><p>Return <var title="">date</var>.</li>
<li><p>Return <var title="">year</var> and <var title="">month</var>.</li>
</ol><p>The rules to <dfn id=parse-a-date-component>parse a date component</dfn>, given an <var title="">input</var> string and a <var title="">position</var>, are
as follows. This will either return a year, a month, and a day, or
</ol><p>The rules to <dfn id=parse-a-month-component>parse a month component</dfn>, given an <var title="">input</var> string and a <var title="">position</var>, are
as follows. This will either return a yearand a month, or
nothing. If at any point the algorithm says that it "fails", this
means that it is aborted at that point and returns nothing.</p>
@@ -2765,6 +2752,56 @@
1 ≤ <var title="">month</var> ≤ 12, then
fail.</li>
<li><p>Return <var title="">year</var> and <var title="">month</var>.</li>
representing <var title="">day</var>, in the range
0 ≤ <var title="">day</var> ≤ <var title="">maxday</var> where <var title="">maxday</var> is the <a href=#number-of-days-in-month-month-of-year-year title="number of days in month month of year year">number of days
in the month <var title="">month</var> and year <var title="">year</var></a></li>
</ol><p>The rules to <dfn id=parse-a-date-string>parse a date string</dfn> are as follows. This
will either return a date, or nothing. If at any point the algorithm
says that it "fails", this means that it is aborted at that point
and returns nothing.</p>
<ol><li><p>Let <var title="">input</var> be the string being
parsed.</li>
<li><p>Let <var title="">position</var> be a pointer into <var title="">input</var>, initially pointing at the start of the
string.</li>
<li><p><a href=#parse-a-date-component>Parse a date component</a> to obtain <var title="">year</var>, <var title="">month</var>, and <var title="">day</var>. If this returns nothing, then fail.</p>
<li><p>If <var title="">position</var> is <em>not</em> beyond the
end of <var title="">input</var>, then fail.</li>
<li><p>Let <var title="">date</var> be the date with year <var title="">year</var>, month <var title="">month</var>, and day <var title="">day</var>.</li>
<li><p>Return <var title="">date</var>.</li>
</ol><p>The rules to <dfn id=parse-a-date-component>parse a date component</dfn>, given an <var title="">input</var> string and a <var title="">position</var>, are
as follows. This will either return a year, a month, and a day, or
nothing. If at any point the algorithm says that it "fails", this
means that it is aborted at that point and returns nothing.</p>
<ol><li><p><a href=#parse-a-month-component>Parse a month component</a> to obtain <var title="">year</var> and <var title="">month</var>. If this returns
nothing, then fail.</li>
<li><p>Let <var title="">maxday</var> be the <a href=#number-of-days-in-month-month-of-year-year>number of days
in month <var title="">month</var> of year <var title="">year</var></a>.</li>
representing the minutes component <var title="">minute</var>
of the timezone offset, in the range 0 ≤ <var title="">minute</var> ≤ 59</li>
</ol></li>
</ul></li>
</ol><p>The aforementioned constraints are:</p>
<ul><li>If present, the time zone hour <var title="">h</var> must be in
the range 0 ≤ <var title="">h</var> ≤ 23. (However, in practice, time
zones do not currently ever have an hour component greater than
14.)</li>
</ol><p class=note>This format allows for time zone offsets from -23:59
to +23:59. In practice, however, the range of actual time zones is
-12:00 to +14:00, and the minutes component of actual time zones is
always either 00, 30, or 45.</p>
<li>If present, the time zone minute <var title="">m</var> must be
in the range 0 ≤ <var title="">m</var> ≤ 59. (However, in practice, time
zones do not currently ever have a minute component other than 0, 30,
or 45.)</li>
</ul><div class=example>
<div class=example>
<p>The following are some examples of dates written as <a href=#valid-global-date-and-time-string title="valid global date and time string">valid global date and
time strings</a>.</p>
@@ -3157,18 +3188,7 @@
<li><p>Return <var title="">time</var> and <var title="">timezone</var>.</li>