Skip to content

calendar.h ~ calendar ~ typenames

Baptiste Thémine edited this page Aug 6, 2020 · 3 revisions
namespace calendar::typenames { /* declarations */ }

Description

Contains all calendar typenames.

Implementation

using typename calendar::clock_type;
using typename calendar::datetime_type;
using typename calendar::duration_type;
using typename year::year_type;
using typename month::month_type;
using typename week_of_year::week_of_year_type;
using typename week_of_month::week_of_month_type;
using typename day_of_year::day_of_year_type;
using typename day_of_month::day_of_month_type;
using typename day_of_week::day_of_week_type;
using typename hour::hour_type;
using typename minute::minute_type;
using typename second::second_type;
using typename milli::milli_type;
using typename timezone::timezone_type;

Examples

A typical usage is to ommit the namespace specifier calendar:: when using calendar types such as below.

#include <JLC/JLC.h>
using namespace JLC;
using namespace calendar::typenames;

int main(){
    constexpr clock_type clock = 0;
    constexpr datetime_type datetime = calendar::make_datetime(2012,12,21);
    constexpr duration_type duration = calendar::make_duration(1,2,3);
}

See also

Clone this wiki locally