|
Date_Time library question...: msg#00307lib.boost.user
Hello everyone, I was wondering, while looking at the source files, why the date_iterator doesn't provide an operator--() ??? I've added this in the "date_iterator.hpp" file : //--------------------------------------------------------- date_itr_base& operator--() { current_ = current_ - get_offset(current_); return *this; } //--------------------------------------------------------- I've rebuilt the library and done this little test : //--------------------------------------------------------- #include <iostream> #include <boost/date_time/gregorian/gregorian.hpp> int main(void) { using namespace boost::gregorian; date today = day_clock::local_day(); day_iterator ditr(today, 1); int nbDaysToIterate = 360; for (;nbDaysToIterate != 0; --ditr, --nbDaysToIterate) { std::cout << to_iso_extended_string(*ditr) << std::endl; } } //--------------------------------------------------------- Everything seems to run OK. I've checked the february month and it has a 28th... Now I wonder why wasn't it included in the release ??? Cheers. Luc Bergeron. ------------------------ Yahoo! Groups Sponsor ---------------------~--> Get 128 Bit SSL Encryption! http://us.click.yahoo.com/CBxunD/vN2EAA/xGHJAA/EbFolB/TM ---------------------------------------------------------------------~-> Info: <http://www.boost.org> Wiki: <http://www.crystalclearsoftware.com/cgi-bin/boost_wiki/wiki.pl> Unsubscribe: <mailto:boost-users-unsubscribe@xxxxxxxxxxxxxxx> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Using function_traits: 00307, Marshall Clow |
|---|---|
| Next by Date: | Re: ublas::matrix sharing storage with ublas::vecto r: 00307, Stephen Crowley |
| Previous by Thread: | RE: Re: Date_time library question...i: 00307, Jeff Garland |
| Next by Thread: | RE: Date_Time library question...: 00307, Jeff Garland |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |