boost::gregorian::date_period,how to increment/decrement the period

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

boost::gregorian::date_period,how to increment/decrement the period

george-37
hello!

boost::gregorian::days size(1);

boost::gregorian::date_period tmp(period.begin()+=size,period.end()-=size);

period=tmp;

is there any better way to increment/decrement the period object

I want
period.begin+=size;
period.end()-=size

to be permanent to period but it doesn't,it returns an object...

any idea??

thanks for any help.

_______________________________________________
Boost-users mailing list
[hidden email]
http://lists.boost.org/mailman/listinfo.cgi/boost-users
Reply | Threaded
Open this post in threaded view
|

Re: boost::gregorian::date_period, how to increment/decrement the period

Jeff Garland
On Sun, 26 Mar 2006 19:30:52 +0000 (UTC), george wrote

> hello!
>
> boost::gregorian::days size(1);
>
> boost::gregorian::date_period tmp(period.begin()+=size,period.end()
> -=size);
>
> period=tmp;
>
> is there any better way to increment/decrement the period object
>
> I want
> period.begin+=size;
> period.end()-=size
>
> to be permanent to period but it doesn't,it returns an object...
>
> any idea??
>
> thanks for any help.

See the post on the developer list...

http://article.gmane.org/gmane.comp.lib.boost.devel/140101

Jeff
_______________________________________________
Boost-users mailing list
[hidden email]
http://lists.boost.org/mailman/listinfo.cgi/boost-users