Boost logo

Boost :

From: Jeff Garland (jeff_at_[hidden])
Date: 2002-04-22 17:58:02

> From: "Jeff Garland" <jeff_at_[hidden]>
> > I'm not sure what you mean by I/O, but the 'calendar' is responsible
> > for defining the mapping between the label form (eg: 2002-1-1) and
> > a counted form. The counted form is used form is used for calculation
> > and comparisons.
> But it seems to me that I need to write "gregorian::date" instead of
> just "date" or perhaps "date<long>".
> I expect that I should be able to do write something like
> date d;
> cin >> set_calendar(gregorian) >> d;
> cout << set_calendar(french_revolutionary) << d;
> The date, d, contains a value representing a day that has many
> names according to different calendar systems. The name only matters
> for input and output.

Something like this approach could be added for the calendar to
calendar conversion (there have been other interfaces suggested).
But I don't believe this 'date' would be anything like
the current gregorian::date. That is, I would expect it
would provide a very minimalist feature set -- pretty
much an integer with maybe a traits class that sets the
epoch start point. By itself it doesn't offer much.
And the current approach with writing a date system
(calendar) class that encapsulates the rules of that
system cleanly supports this approach. That is,
even if the library didn't directly support this you
could add it without changing the core by using the
functions from the gregorian_calendar class.


Boost list run by bdawes at, gregod at, cpdaniel at, john at