$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
From: Janusz Piwowarski (jpiw_at_[hidden])
Date: 2004-04-20 02:59:01
Rob Stewart writes:
> >
> > d.allow_clipping_to_eom() + 2*months;
> > d.disallow_clipping_to_eom() + 2*months;
>
> That would require modifying the date class to add new mfs for
> each style, right?
Right
> > or
> >
> > allow_clipping_to_eom(d) + 2*months;
> > disallow_clipping_to_eom(d) + 2*months;
> >
> > where adding months to date directly isn't allowed.
>
> That sounds like an excellent approach. Not only might the
> library provide one or more such date wrappers and factory
> functions, but this provides a clear usage pattern that custom
> wrappers can follow.
>
Yes, it's possible to create rules like
dont_stop_on_sunday(d) + 14*days
Janusz