Opened 19 years ago

Closed 13 years ago

#187 closed Feature Requests (fixed)

locale

Reported by: tazforever Owned by: az_sw_dude
Milestone: Component: date_time
Version: None Severity: Showstopper
Keywords: Cc:

Description (last modified by René Rivera)

this short example

#include <boost/date_time/gregorian/gregorian.hpp>
#include <iostream>

using namespace boost::gregorian;
using namespace std;

int main()
{
  date d(day_clock::local_day());
  cout << d << endl;
}

outputs 

2003-Aug-01

I'm French. Is there any thing that deals with locale
in boost ?
i'd like somthing so i can display date (and other
things in date_time) the way i understand (like
01-Aou-2003, 01082003 or 01-08-2003)

Change History (4)

comment:1 by René Rivera, 15 years ago

Component: Nonedate_time
Description: modified (diff)
Severity: Showstopper

comment:2 by Dave Abrahams, 15 years ago

Owner: changed from nobody to az_sw_dude
Status: assignednew

comment:3 by Marshall Clow, 13 years ago

Marshall sez: I'm pretty sure that this was addressed in the rewrite of date_time's IO routines for 1.33. This bug should be closed.

comment:4 by Andrey Semashev, 13 years ago

Resolution: Nonefixed
Status: newclosed

Boost.DateTime provides locale facets for date/time formatting/parsing. Names for months and weekdays, as well as the overall format, can be customized though the corresponding methods of the facets.

http://www.boost.org/doc/libs/release/doc/html/date_time/date_time_io.html

Note: See TracTickets for help on using tickets.