Boost logo

Boost :

From: george (george13p_at_[hidden])
Date: 2006-03-27 01:27:35


> date_period
> contract(const date_period& dp, days len)
> {
> if (dp.length() < len) {
> //handle errors here -- after contraction nothing is left...
> }
> return date_period(dp.start() + len, dp.end()-len);
> }
>
> In use:
> date_period dp(....);
> dp = contract(dp, days(2));

thanks Jeff,I will go this way.
I suggest you to add also this functionality in a next version(1.34.1(?))
it's very usefull.

thanks


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk