The date iterators in Boost Date-Time appear to be designed to support iteration forward in time, being modelled on the STL InputIterator. However, at times it is convenient to iterate backwards in time, and the temptation is just to use something like
day_iterator ditr(date,-1); ++ditr; that is; specify a negative "offset" as the optional construction parameter which all four of the iterators provide. This works for all of the provided iterators except the month_iterator, and it wouldn't be too difficult to make that one work as well (by providing a subtract() method for the wrapping_int2 template used in the implementation). Are there any other issues involved in providing this support for backwards iteration? Chris Trengove _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost