Skip to content

Commit a18ddd2

Browse files
committed
Jonathan adds wording for 4285
1 parent 2e4a040 commit a18ddd2

File tree

1 file changed

+119
-0
lines changed

1 file changed

+119
-0
lines changed

xml/issue4285.xml

Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,128 @@ when `do_date_order() != no_order`. It should not default to the `mdy` format
5454
when `do_date_order()` returns `no_order`, because if the `mdy` format is
5555
correct then it should have returned `mdy`!"
5656
</p>
57+
58+
<note>2025-10-21; Jonathan adds wording</note>
59+
<p>
60+
This restores the slashes lost by LWG <iref ref="461"/>
61+
and attempts to make the use and effects of `no_order` more useful.
62+
It does not attempt to address the problem that `do_date_order()`
63+
has no access to an `ios_base` object.
64+
</p>
5765
</discussion>
5866

5967
<resolution>
68+
<p>
69+
This wording is relative to <paper num="N5014"/>.
70+
</p>
71+
72+
<ol>
73+
74+
<li><p>Modify <sref ref="[locale.time.get.virtuals]"/> as indicated:</p>
75+
76+
<blockquote>
77+
<pre>dateorder do_date_order() const;</pre>
78+
<blockquote>
79+
<p>-1- <i>Returns</i>:
80+
An enumeration value indicating the preferred order of components for
81+
those date formats that are composed of day, month, and year.<del><sup>228</sup></del>
82+
Returns `no_order` if the date format specified by `'x'`
83+
<del>
84+
contains other variable components (e.g., Julian day, week number, week day)
85+
</del>
86+
<ins>
87+
does not match one of the formats in Table [tab:locale.time.get.dogetdate]
88+
</ins>
89+
.
90+
</p>
91+
<blockquote>
92+
<del>
93+
228) This function is intended as a convenience only, for common formats,
94+
and can return `no_order` in valid locales.
95+
</del>
96+
</blockquote>
97+
</blockquote>
98+
99+
<pre>
100+
iter_type do_get_time(iter_type s, iter_type end, ios_base&amp; str,
101+
ios_base::iostate&amp; err, tm* t) const;
102+
</pre>
103+
<blockquote>[...]</blockquote>
104+
105+
<pre>
106+
iter_type do_get_date(iter_type s, iter_type end, ios_base&amp; str,
107+
ios_base::iostate&amp; err, tm* t) const;
108+
</pre>
109+
<blockquote>
110+
<p>
111+
<i>-4- Effects</i>:
112+
Reads characters starting at s until it has extracted those `tm`
113+
members and remaining format characters used by
114+
<code>time_put&lt;&gt;::put</code>
115+
to produce one of the following formats, or until it encounters an error.
116+
The format depends on the value returned by `date_order()` as shown in
117+
Table 102.
118+
<ins>
119+
When `do_date_order()` returns `no_order`, it is unspecified whether
120+
the format shown in the table is used, or whether additional
121+
implementation-defined formats are accepted.
122+
</ins>
123+
</p>
124+
<p><ins>[<i>Note ?</i>:
125+
For example, an implementation can accept dates in the format specified by
126+
`'x'` as well as, or instead of, the format `"%m/%d/%y"`.
127+
&mdash; <i>end note</i></ins>
128+
</p>
129+
<p><del>-5-
130+
An implementation may also accept additional implementation-defined formats.
131+
</del>
132+
</p>
133+
<p>-6- <i>Returns</i>:
134+
An iterator pointing immediately beyond the last character recognized as
135+
possibly part of a valid date.
136+
</p>
137+
</blockquote>
138+
139+
<p>Table 102 &mdash; `do_get_date` effects [tab:locale.time.get.dogetdate]</p>
140+
141+
<style>
142+
table { border-collapse: separate; border-spacing: 0 6px; width: auto; }
143+
thead, tbody { box-shadow: 0 0 0 1px black; border-spacing: 1em; }
144+
th, td { padding-left: 0.5em; padding-right: 0.5em; }
145+
</style>
146+
147+
<table>
148+
<thead>
149+
<tr> <th>`date_order()`</th><th>Format</th> </tr>
150+
</thead>
151+
<tbody>
152+
<tr>
153+
<td>`no_order`</td>
154+
<td><code>"%m<ins>/</ins>%d<ins>/</ins>%y"</code></td></tr>
155+
<tr>
156+
<td>`dmy`</td>
157+
<td><code>"%d<ins>/</ins>%m<ins>/</ins>%y"</code></td>
158+
</tr>
159+
<tr>
160+
<td>`mdy`</td>
161+
<td><code>"%m<ins>/</ins>%d<ins>/</ins>%y"</code></td>
162+
</tr>
163+
<tr>
164+
<td>`ymd`</td>
165+
<td><code>"%y<ins>/</ins>%m<ins>/</ins>%d"</code></td>
166+
</tr>
167+
<tr>
168+
<td>`ydm`</td>
169+
<td><code>"%y<ins>/</ins>%d<ins>/</ins>%m"</code></td>
170+
</tr>
171+
</tbody>
172+
</table>
173+
174+
</blockquote>
175+
176+
</li>
177+
</ol>
178+
60179
</resolution>
61180

62181
</issue>

0 commit comments

Comments
 (0)