From Jason Turner

[category.time]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmp0l3ai4ln/{from.md → to.md} +19 -19
tmp/tmp0l3ai4ln/{from.md → to.md} RENAMED
@@ -1,8 +1,8 @@
1
- ### The time category <a id="category.time">[[category.time]]</a>
2
 
3
- #### General <a id="category.time.general">[[category.time.general]]</a>
4
 
5
  Templates `time_get<charT, InputIterator>` and
6
  `time_put<charT, OutputIterator>` provide date and time formatting and
7
  parsing. All specifications of member functions for `time_put` and
8
  `time_get` in the subclauses of  [[category.time]] only apply to the
@@ -10,13 +10,13 @@ specializations required in Tables  [[tab:locale.category.facets]] and 
10
  [[tab:locale.spec]] [[locale.category]]. Their members use their
11
  `ios_base&`, `ios_base::iostate&`, and `fill` arguments as described in 
12
  [[locale.categories]], and the `ctype<>` facet, to determine formatting
13
  details.
14
 
15
- #### Class template `time_get` <a id="locale.time.get">[[locale.time.get]]</a>
16
 
17
- ##### General <a id="locale.time.get.general">[[locale.time.get.general]]</a>
18
 
19
  ``` cpp
20
  namespace std {
21
  class time_base {
22
  public:
@@ -78,11 +78,11 @@ sequence; otherwise either an error is reported or unspecified values
78
  are assigned.[^15]
79
 
80
  If the end iterator is reached during parsing by any of the `get()`
81
  member functions, the member sets `ios_base::eofbit` in `err`.
82
 
83
- ##### Members <a id="locale.time.get.members">[[locale.time.get.members]]</a>
84
 
85
  ``` cpp
86
  dateorder date_order() const;
87
  ```
88
 
@@ -171,11 +171,11 @@ by what means the function performs case-insensitive comparison or
171
  whether multi-character sequences are considered while doing
172
  so. — *end note*]
173
 
174
  *Returns:* `s`.
175
 
176
- ##### Virtual functions <a id="locale.time.get.virtuals">[[locale.time.get.virtuals]]</a>
177
 
178
  ``` cpp
179
  dateorder do_date_order() const;
180
  ```
181
 
@@ -289,11 +289,11 @@ recognized as possibly part of a valid input sequence for the given
289
  *Remarks:* It is unspecified whether multiple calls to `do_get()` with
290
  the address of the same `tm` object will update the current contents of
291
  the object or simply overwrite its members. Portable programs should
292
  zero out the object before invoking the function.
293
 
294
- #### Class template `time_get_byname` <a id="locale.time.get.byname">[[locale.time.get.byname]]</a>
295
 
296
  ``` cpp
297
  namespace std {
298
  template<class charT, class InputIterator = istreambuf_iterator<charT>>
299
  class time_get_byname : public time_get<charT, InputIterator> {
@@ -308,11 +308,13 @@ namespace std {
308
  ~time_get_byname();
309
  };
310
  }
311
  ```
312
 
313
- #### Class template `time_put` <a id="locale.time.put">[[locale.time.put]]</a>
 
 
314
 
315
  ``` cpp
316
  namespace std {
317
  template<class charT, class OutputIterator = ostreambuf_iterator<charT>>
318
  class time_put : public locale::facet {
@@ -336,11 +338,11 @@ namespace std {
336
  char format, char modifier) const;
337
  };
338
  }
339
  ```
340
 
341
- ##### Members <a id="locale.time.put.members">[[locale.time.put.members]]</a>
342
 
343
  ``` cpp
344
  iter_type put(iter_type s, ios_base& str, char_type fill, const tm* t,
345
  const charT* pattern, const charT* pat_end) const;
346
  iter_type put(iter_type s, ios_base& str, char_type fill, const tm* t,
@@ -355,27 +357,25 @@ call to `do_put`; thus, format elements and other characters are
355
  interleaved in the output in the order in which they appear in the
356
  pattern. Format sequences are identified by converting each character
357
  `c` to a `char` value as if by `ct.narrow(c, 0)`, where `ct` is a
358
  reference to `ctype<charT>` obtained from `str.getloc()`. The first
359
  character of each sequence is equal to `’%’`, followed by an optional
360
- modifier character `mod`[^17]
361
-
362
- and a format specifier character `spec` as defined for the function
363
- `strftime`. If no modifier character is present, `mod` is zero. For each
364
- valid format sequence identified, calls
365
  `do_put(s, str, fill, t, spec, mod)`.
366
 
367
  The second form calls `do_put(s, str, fill, t, format, modifier)`.
368
 
369
- [*Note 1*: The `fill` argument can be used in the
370
  implementation-defined formats or by derivations. A space character is a
371
  reasonable default for this argument. — *end note*]
372
 
373
  *Returns:* An iterator pointing immediately after the last character
374
  produced.
375
 
376
- ##### Virtual functions <a id="locale.time.put.virtuals">[[locale.time.put.virtuals]]</a>
377
 
378
  ``` cpp
379
  iter_type do_put(iter_type s, ios_base&, char_type fill, const tm* t,
380
  char format, char modifier) const;
381
  ```
@@ -386,26 +386,26 @@ parameters `format` and `modifier`, interpreted identically as the
386
  format specifiers in the string argument to the standard library
387
  function `strftime()`, except that the sequence of characters produced
388
  for those specifiers that are described as depending on the C locale are
389
  instead *implementation-defined*.
390
 
391
- [*Note 2*: Interpretation of the `modifier` argument is
392
  implementation-defined. — *end note*]
393
 
394
  *Returns:* An iterator pointing immediately after the last character
395
  produced.
396
 
397
- [*Note 3*: The `fill` argument can be used in the
398
  implementation-defined formats or by derivations. A space character is a
399
  reasonable default for this argument. — *end note*]
400
 
401
  *Recommended practice:* Interpretation of the `modifier` should follow
402
  POSIX conventions. Implementations should refer to other standards such
403
  as POSIX for a specification of the character sequences produced for
404
  those specifiers described as depending on the C locale.
405
 
406
- #### Class template `time_put_byname` <a id="locale.time.put.byname">[[locale.time.put.byname]]</a>
407
 
408
  ``` cpp
409
  namespace std {
410
  template<class charT, class OutputIterator = ostreambuf_iterator<charT>>
411
  class time_put_byname : public time_put<charT, OutputIterator> {
 
1
+ #### The time category <a id="category.time">[[category.time]]</a>
2
 
3
+ ##### General <a id="category.time.general">[[category.time.general]]</a>
4
 
5
  Templates `time_get<charT, InputIterator>` and
6
  `time_put<charT, OutputIterator>` provide date and time formatting and
7
  parsing. All specifications of member functions for `time_put` and
8
  `time_get` in the subclauses of  [[category.time]] only apply to the
 
10
  [[tab:locale.spec]] [[locale.category]]. Their members use their
11
  `ios_base&`, `ios_base::iostate&`, and `fill` arguments as described in 
12
  [[locale.categories]], and the `ctype<>` facet, to determine formatting
13
  details.
14
 
15
+ ##### Class template `time_get` <a id="locale.time.get">[[locale.time.get]]</a>
16
 
17
+ ###### General <a id="locale.time.get.general">[[locale.time.get.general]]</a>
18
 
19
  ``` cpp
20
  namespace std {
21
  class time_base {
22
  public:
 
78
  are assigned.[^15]
79
 
80
  If the end iterator is reached during parsing by any of the `get()`
81
  member functions, the member sets `ios_base::eofbit` in `err`.
82
 
83
+ ###### Members <a id="locale.time.get.members">[[locale.time.get.members]]</a>
84
 
85
  ``` cpp
86
  dateorder date_order() const;
87
  ```
88
 
 
171
  whether multi-character sequences are considered while doing
172
  so. — *end note*]
173
 
174
  *Returns:* `s`.
175
 
176
+ ###### Virtual functions <a id="locale.time.get.virtuals">[[locale.time.get.virtuals]]</a>
177
 
178
  ``` cpp
179
  dateorder do_date_order() const;
180
  ```
181
 
 
289
  *Remarks:* It is unspecified whether multiple calls to `do_get()` with
290
  the address of the same `tm` object will update the current contents of
291
  the object or simply overwrite its members. Portable programs should
292
  zero out the object before invoking the function.
293
 
294
+ ##### Class template `time_get_byname` <a id="locale.time.get.byname">[[locale.time.get.byname]]</a>
295
 
296
  ``` cpp
297
  namespace std {
298
  template<class charT, class InputIterator = istreambuf_iterator<charT>>
299
  class time_get_byname : public time_get<charT, InputIterator> {
 
308
  ~time_get_byname();
309
  };
310
  }
311
  ```
312
 
313
+ ##### Class template `time_put` <a id="locale.time.put">[[locale.time.put]]</a>
314
+
315
+ ###### General <a id="locale.time.put.general">[[locale.time.put.general]]</a>
316
 
317
  ``` cpp
318
  namespace std {
319
  template<class charT, class OutputIterator = ostreambuf_iterator<charT>>
320
  class time_put : public locale::facet {
 
338
  char format, char modifier) const;
339
  };
340
  }
341
  ```
342
 
343
+ ###### Members <a id="locale.time.put.members">[[locale.time.put.members]]</a>
344
 
345
  ``` cpp
346
  iter_type put(iter_type s, ios_base& str, char_type fill, const tm* t,
347
  const charT* pattern, const charT* pat_end) const;
348
  iter_type put(iter_type s, ios_base& str, char_type fill, const tm* t,
 
357
  interleaved in the output in the order in which they appear in the
358
  pattern. Format sequences are identified by converting each character
359
  `c` to a `char` value as if by `ct.narrow(c, 0)`, where `ct` is a
360
  reference to `ctype<charT>` obtained from `str.getloc()`. The first
361
  character of each sequence is equal to `’%’`, followed by an optional
362
+ modifier character `mod` and a format specifier character `spec` as
363
+ defined for the function `strftime`. If no modifier character is
364
+ present, `mod` is zero. For each valid format sequence identified, calls
 
 
365
  `do_put(s, str, fill, t, spec, mod)`.
366
 
367
  The second form calls `do_put(s, str, fill, t, format, modifier)`.
368
 
369
+ [*Note 2*: The `fill` argument can be used in the
370
  implementation-defined formats or by derivations. A space character is a
371
  reasonable default for this argument. — *end note*]
372
 
373
  *Returns:* An iterator pointing immediately after the last character
374
  produced.
375
 
376
+ ###### Virtual functions <a id="locale.time.put.virtuals">[[locale.time.put.virtuals]]</a>
377
 
378
  ``` cpp
379
  iter_type do_put(iter_type s, ios_base&, char_type fill, const tm* t,
380
  char format, char modifier) const;
381
  ```
 
386
  format specifiers in the string argument to the standard library
387
  function `strftime()`, except that the sequence of characters produced
388
  for those specifiers that are described as depending on the C locale are
389
  instead *implementation-defined*.
390
 
391
+ [*Note 3*: Interpretation of the `modifier` argument is
392
  implementation-defined. — *end note*]
393
 
394
  *Returns:* An iterator pointing immediately after the last character
395
  produced.
396
 
397
+ [*Note 4*: The `fill` argument can be used in the
398
  implementation-defined formats or by derivations. A space character is a
399
  reasonable default for this argument. — *end note*]
400
 
401
  *Recommended practice:* Interpretation of the `modifier` should follow
402
  POSIX conventions. Implementations should refer to other standards such
403
  as POSIX for a specification of the character sequences produced for
404
  those specifiers described as depending on the C locale.
405
 
406
+ ##### Class template `time_put_byname` <a id="locale.time.put.byname">[[locale.time.put.byname]]</a>
407
 
408
  ``` cpp
409
  namespace std {
410
  template<class charT, class OutputIterator = ostreambuf_iterator<charT>>
411
  class time_put_byname : public time_put<charT, OutputIterator> {