Boost logo

Boost Users :

From: Alexandre Gacon (alexandre.gacon_at_[hidden])
Date: 2006-03-10 11:07:46


Hi,
 
The boost::date does not provide directly a way to have string information
on a date.
 
You should look at the "Date Time Input/Output" chapter of the documentation
to get the function you want.
 
You have some example like this:
 
//example to customize output to be "LongWeekday LongMonthname day, year"
// "%A %b %d, %Y"
date d(2005,Jun,25);
date_facet* facet(new date_facet("%A %B %d, %Y"));
std::cout.imbue(std::locale(std::cout.getloc(), facet));
std::cout << d << std::endl;
// "Saturday June 25, 2005"

Hope this will help you.

Alexandre Gacon

________________________________

De : boost-users-bounces_at_[hidden]
[mailto:boost-users-bounces_at_[hidden]] De la part de Sliwa, Przemyslaw
(London)
Envoyé : vendredi 10 mars 2006 14:40
À : boost-users_at_[hidden]
Objet : [Boost-users] Date-time question

Hi,
 
I would like to know if there is a way to get the string representation (3
chars) from a boost::gregorian::date, e.g. 10/03/2006 returns "Fri".
This is a pretty fundamental functionality but I could not find anything in
the documentation. I probably missed something.
 
Could anyone help?
 
Thanks
 
Pshemek
 

Kind regards

Pshemek

 

Przemyslaw Sliwa
Global Foreign Exchange

FX Risk Engine Development
Merrill Lynch
( +44 (0)20 7995 4182
) +44 (0)79 6325 2319
* Email: przemyslaw_sliwa_at_[hidden]

 
________________________________

If you are not an intended recipient of this e-mail, please notify the
sender, delete it and do not read, act upon, print, disclose, copy, retain
or redistribute it. Click here <http://www.ml.com/email_terms/> for
important additional terms relating to this e-mail.
http://www.ml.com/email_terms/
________________________________


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