|
Boost Users : |
From: Michael Linck (mgl_at_[hidden])
Date: 2007-10-30 20:08:51
Looking at your code sample again, I also wouldn't imbue the stream
until after you set the format for the facets. For all you know they're
getting copies when you call imbue so the format lines would have no
effect on the stream.
mike
>
> //Begin snippit
> string formatDate(string inpDate)
> {
> stringstream ss;
> local_date_time checkDate(not_a_date_time);
> local_time_input_facet* input_facet = new local_time_input_facet();
> local_time_facet* output_facet = new local_time_facet();
>
> ss.imbue(locale(locale::classic(), output_facet));
> ss.imbue(locale(ss.getloc(), input_facet));
>
>
> input_facet->format("%d/%b/%Y %H:%M");
> output_facet->set_iso_format();
>
>
> ss << inpDate;
>
> return ss.str();
> }
>
>
>
>
>
>
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net