> Your examples are equivalent to set operations on an ordinary real number line.
> The boost Math library doesn't seem to implement this. Anyway, I think that
> this what you're asking for should be made into a general-purpose utility, and
> not something specific to the date_time library.
>

Why is subtraction of periods less "specific to the date_time library", than the following functions?
contains()
intersects()
intersection()
shift()
expand()
merge()
span()
 
Subtraction of intervals seems to be very "native" operation for time_period, since it's VERY common task when working with time intervals. For example: one of my classes evaluates requests expressed in terms time_period. Each request is expensive, so the implementation "caches" them: say, if a user had already issued the request  for period1:[1..8) and now he requested period2:[5..15), the evaluation must take place for [8-15) only...
 


Connect to the next generation of MSN Messenger  Get it now!