Boost logo

Boost :

From: Yuval Ronen (ronen_yuval_at_[hidden])
Date: 2006-02-27 09:43:45


Jeff Garland wrote:
> On Sun, 26 Feb 2006 00:50:04 +0200, Yuval Ronen wrote
>
>>Hi.
>>I've used the date_time I/O using facets and found it too
>>complicated. The thing that bothers me is that I need to use a facet
>>to specify the format string (e.g "HH:MM:SS"). This is burdensome.
>>IMO, using facets is fine for defining things which are really
>>locale-related (and are mostly constant during the process lifetime)
>>such as the month names in the local language.
>
>
> Of course the order of dates *is* locale related. Even in the current
> standard library there is information in date facet about ordering.

I think the date order is a borderline case. In theory, yes, the order
is locale-related and the date_facet can have methods like:

     void set_dmy_order();
     void set_mdy_order();

In practice, however, when specifying the date format ("%Y-%m-%d", for
example), this overrides the former order settings, so these settings
don't have much (any?) useful usages.

P.S: On your other post, you say that you might need to remove the
facets for a whole different reason. If this happens, then you can
ignore all this...


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk