Boost logo

Boost :

Subject: [boost] [chrono/date] class names
From: Vicente J. Botet Escriba (vicente.botet_at_[hidden])
Date: 2013-05-11 12:31:03


Hi,

I would like to fix the names of date classes for the different
representations. I'm not saying that all the representations need to be
provided for a first release. Here it is my proposal.

The following are unchecked and non contextual dates classes

* calendar_date: field based representation of year + month + day.
* serial_date: days based representation
* ordinal_date: field based representation of year + day_of_year
* week_date: field based representation of year + week + weekday

Checked dates classes names just add a checked_ prefix to the
corresponding unchecked date classes.

* checked_calendar_date: field based representation of year + month + day.
* checked_serial_date: days based representation
* checked_ordinal_date: field based representation of year + day_of_year
* checked_week_date: field based representation of year + week + weekday

We can also have an alias date
template <typename Tag = serial, validity=validity::unchecked>
class date;

so that

date<calendar> ~ calendar_date
date<serial> ~ serial_date
date<> ~ serial_date
...

I'm, open of course, to other defaults for these parameters, if the idea
of an alias is accepted.

For the time been a single contextual date class should be enough, as
all the contextual information is relative to the year/month/day
representation.
* contextual_date: field based representation of year + month + day +
context-meta-data

Comments, critics and suggestions are welcome.

Best,
Vicente


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