Boost logo

Boost :

From: Michiel Salters (Michiel.Salters_at_[hidden])
Date: 2001-03-22 11:14:50

> -----Original Message-----
> From: George A. Heintzelman [mailto:georgeh_at_[hidden]]
> Subject: Re: [boost] Re: Date/Time Classes


> For example:
> using boost::date_format;
> is >> date_format("mm/dd/yyyy") >> date; // "04/22/2023";
> is >> date_format("dow, dd mon, yyyy") >> date; // "TUE, 22
> APR, 2023";
> George Heintzelman
> georgeh_at_[hidden]

I'd think you'd want
is >> date_format("enUS", "%dow, %dd %mon, %yyyy") >> date
to force a %dow representation. The % makes clear which part of
the string should be replaced, a la printf().

This would have the big advantage that it's impossible to write
code; code which assumes a US locale will have to state so explicitly.
(Down with the "C" locale ! :)

Boost list run by bdawes at, gregod at, cpdaniel at, john at