|
Boost : |
From: Kostya Altukhov (kostya_at_[hidden])
Date: 2002-04-25 04:12:08
Powell, Gary wrote:
>os << use_stringMonths << use_number_day_of_week << ym_delimiter(',')
><< mdy_order << time_delimiter(':') << date;
>
> "April 24,2002 3 12:10:34" etc.
>
What will be equivalent for "%u-%V-%G", which I use rather often
lately? What if I want "%w-%W-%Y" instead, or "%Y-%U-%u"?
What if I do not want to include weekday number? What if I want to
prefix weekday number with zero? In your example, what if I want
weekday appear before the date? What if I do not need seconds in
the string, or do not need minutes and seconds? What if I want time
appear before the date?
I can go on and on. My point is that in order to achieve the same
flexibility as strftime has, you need to create a nearly infinite number
of manipulators. I think set_format(...) is much better.
Best regards,
Kostya
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk