date_time.h
//
// Copyright (c) 2009-2011 Artyom Beilis (Tonkikh)
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
#ifndef BOOSTER_LOCALE_DATE_TIME_H_INCLUDED
#define BOOSTER_LOCALE_DATE_TIME_H_INCLUDED
#include <booster/config.h>
#ifdef BOOSTER_MSVC
# pragma warning(push)
# pragma warning(disable : 4275 4251 4231 4660)
#endif
#include <booster/locale/hold_ptr.h>
#include <booster/locale/date_time_facet.h>
#include <booster/locale/formatting.h>
#include <booster/locale/time_zone.h>
#include <locale>
#include <vector>
#include <booster/backtrace.h>
namespace booster {
namespace locale {
class date_time_error : public booster::runtime_error {
public:
date_time_error(std::string const &e) : booster::runtime_error(e) {}
};
struct date_time_period
{
period::period_type type;
int value;
date_time_period operator+() const { return *this; }
date_time_period operator-() const { return date_time_period(type,-value); }
date_time_period(period::period_type f=period::period_type(),int v=1) : type(f), value(v) {}
};
namespace period {
inline period_type invalid(){ return period_type(marks::invalid); }
inline period_type era(){ return period_type(marks::era); }
inline period_type year(){ return period_type(marks::year); }
inline period_type extended_year(){ return period_type(marks::extended_year); }
inline period_type month(){ return period_type(marks::month); }
inline period_type day(){ return period_type(marks::day); }
inline period_type day_of_year(){ return period_type(marks::day_of_year); }
inline period_type day_of_week(){ return period_type(marks::day_of_week); }
inline period_type day_of_week_in_month(){ return period_type(marks::day_of_week_in_month); }
inline period_type day_of_week_local(){ return period_type(marks::day_of_week_local); }
inline period_type hour(){ return period_type(marks::hour); }
inline period_type hour_12(){ return period_type(marks::hour_12); }
inline period_type am_pm(){ return period_type(marks::am_pm); }
inline period_type minute(){ return period_type(marks::minute); }
inline period_type second(){ return period_type(marks::second); }
inline period_type week_of_year(){ return period_type(marks::week_of_year); }
inline period_type week_of_month(){ return period_type(marks::week_of_month); }
inline period_type first_day_of_week(){ return period_type(marks::first_day_of_week); }
inline date_time_period era(int v) { return date_time_period(era(),v); }
inline date_time_period year(int v) { return date_time_period(year(),v); }
inline date_time_period extended_year(int v) { return date_time_period(extended_year(),v); }
inline date_time_period month(int v) { return date_time_period(month(),v); }
inline date_time_period day(int v) { return date_time_period(day(),v); }
inline date_time_period day_of_year(int v) { return date_time_period(day_of_year(),v); }
inline date_time_period day_of_week(int v) { return date_time_period(day_of_week(),v); }
inline date_time_period day_of_week_in_month(int v) { return date_time_period(day_of_week_in_month(),v); }
inline date_time_period day_of_week_local(int v) { return date_time_period(day_of_week_local(),v); }
inline date_time_period hour(int v) { return date_time_period(hour(),v); }
inline date_time_period hour_12(int v) { return date_time_period(hour_12(),v); }
inline date_time_period am_pm(int v) { return date_time_period(am_pm(),v); }
inline date_time_period minute(int v) { return date_time_period(minute(),v); }
inline date_time_period second(int v) { return date_time_period(second(),v); }
inline date_time_period week_of_year(int v) { return date_time_period(week_of_year(),v); }
inline date_time_period week_of_month(int v) { return date_time_period(week_of_month(),v); }
inline date_time_period first_day_of_week(int v) { return date_time_period(first_day_of_week(),v); }
inline date_time_period january() { return date_time_period(month(),0); }
inline date_time_period february() { return date_time_period(month(),1); }
inline date_time_period march() { return date_time_period(month(),2); }
inline date_time_period april() { return date_time_period(month(),3); }
inline date_time_period may() { return date_time_period(month(),4); }
inline date_time_period june() { return date_time_period(month(),5); }
inline date_time_period july() { return date_time_period(month(),6); }
inline date_time_period august() { return date_time_period(month(),7); }
inline date_time_period september() { return date_time_period(month(),8); }
inline date_time_period october() { return date_time_period(month(),9); }
inline date_time_period november() { return date_time_period(month(),10); }
inline date_time_period december() { return date_time_period(month(),11); }
inline date_time_period sunday() { return date_time_period(day_of_week(),1); }
inline date_time_period monday() { return date_time_period(day_of_week(),2); }
inline date_time_period tuesday() { return date_time_period(day_of_week(),3); }
inline date_time_period wednesday() { return date_time_period(day_of_week(),4); }
inline date_time_period thursday() { return date_time_period(day_of_week(),5); }
inline date_time_period friday() { return date_time_period(day_of_week(),6); }
inline date_time_period saturday() { return date_time_period(day_of_week(),7); }
inline date_time_period am() { return date_time_period(am_pm(),0); }
inline date_time_period pm() { return date_time_period(am_pm(),1); }
inline date_time_period operator+(period::period_type f)
{
return date_time_period(f);
}
inline date_time_period operator-(period::period_type f)
{
return date_time_period(f,-1);
}
template<typename T>
date_time_period operator*(period::period_type f,T v)
{
return date_time_period(f,v);
}
template<typename T>
date_time_period operator*(T v,period::period_type f)
{
return date_time_period(f,v);
}
template<typename T>
date_time_period operator*(T v,date_time_period f)
{
return date_time_period(f.type,f.value*v);
}
template<typename T>
date_time_period operator*(date_time_period f,T v)
{
return date_time_period(f.type,f.value*v);
}
} // period
class date_time_period_set {
public:
date_time_period_set()
{
}
date_time_period_set(period::period_type f)
{
basic_[0]=date_time_period(f);
}
date_time_period_set(date_time_period const &fl)
{
basic_[0]=fl;
}
void add(date_time_period f)
{
size_t n=size();
if(n < 4)
basic_[n]=f;
else
periods_.push_back(f);
}
size_t size() const
{
if(basic_[0].type == period::period_type())
return 0;
if(basic_[1].type == period::period_type())
return 1;
if(basic_[2].type == period::period_type())
return 2;
if(basic_[3].type == period::period_type())
return 3;
return 4+periods_.size();
}
date_time_period const &operator[](size_t n) const
{
if(n >= size())
throw booster::out_of_range("Invalid index to date_time_period");
if(n < 4)
return basic_[n];
else
return periods_[n-4];
}
private:
date_time_period basic_[4];
std::vector<date_time_period> periods_;
};
inline date_time_period_set operator+(date_time_period_set const &a,date_time_period_set const &b)
{
date_time_period_set s(a);
for(unsigned i=0;i<b.size();i++)
s.add(b[i]);
return s;
}
inline date_time_period_set operator-(date_time_period_set const &a,date_time_period_set const &b)
{
date_time_period_set s(a);
for(unsigned i=0;i<b.size();i++)
s.add(-b[i]);
return s;
}
class BOOSTER_API calendar {
public:
calendar(std::ios_base &ios);
calendar(std::locale const &l,std::string const &zone);
calendar(std::locale const &l);
calendar(std::string const &zone);
calendar();
~calendar();
calendar(calendar const &other);
calendar const &operator=(calendar const &other);
int minimum(period::period_type f) const;
int greatest_minimum(period::period_type f) const;
int maximum(period::period_type f) const;
int least_maximum(period::period_type f) const;
int first_day_of_week() const;
std::locale get_locale() const;
std::string get_time_zone() const;
bool is_gregorian() const;
bool operator==(calendar const &other) const;
bool operator!=(calendar const &other) const;
private:
friend class date_time;
std::locale locale_;
std::string tz_;
hold_ptr<abstract_calendar> impl_;
};
class BOOSTER_API date_time {
public:
date_time();
date_time(date_time const &other);
date_time(date_time const &other,date_time_period_set const &set);
date_time const &operator=(date_time const &other);
~date_time();
date_time(double time);
date_time(double time,calendar const &cal);
date_time(calendar const &cal);
date_time(date_time_period_set const &set);
date_time(date_time_period_set const &set,calendar const &cal);
date_time const &operator=(date_time_period_set const &f);
void set(period::period_type f,int v);
int get(period::period_type f) const;
int operator/(period::period_type f) const
{
return get(f);
}
date_time operator+(period::period_type f) const
{
return *this+date_time_period(f);
}
date_time operator-(period::period_type f) const
{
return *this-date_time_period(f);
}
date_time const &operator+=(period::period_type f)
{
return *this+=date_time_period(f);
}
date_time const &operator-=(period::period_type f)
{
return *this-=date_time_period(f);
}
date_time operator<<(period::period_type f) const
{
return *this<<date_time_period(f);
}
date_time operator>>(period::period_type f) const
{
return *this>>date_time_period(f);
}
date_time const &operator<<=(period::period_type f)
{
return *this<<=date_time_period(f);
}
date_time const &operator>>=(period::period_type f)
{
return *this>>=date_time_period(f);
}
date_time operator+(date_time_period const &v) const;
date_time operator-(date_time_period const &v) const;
date_time const &operator+=(date_time_period const &v);
date_time const &operator-=(date_time_period const &v);
date_time operator<<(date_time_period const &v) const;
date_time operator>>(date_time_period const &v) const ;
date_time const &operator<<=(date_time_period const &v);
date_time const &operator>>=(date_time_period const &v);
date_time operator+(date_time_period_set const &v) const;
date_time operator-(date_time_period_set const &v) const;
date_time const &operator+=(date_time_period_set const &v);
date_time const &operator-=(date_time_period_set const &v);
date_time operator<<(date_time_period_set const &v) const;
date_time operator>>(date_time_period_set const &v) const ;
date_time const &operator<<=(date_time_period_set const &v);
date_time const &operator>>=(date_time_period_set const &v);
double time() const;
void time(double v);
bool operator==(date_time const &other) const;
bool operator!=(date_time const &other) const;
bool operator<(date_time const &other) const;
bool operator>(date_time const &other) const;
bool operator<=(date_time const &other) const;
bool operator>=(date_time const &other) const;
void swap(date_time &other);
int difference(date_time const &other,period::period_type f) const;
int minimum(period::period_type f) const;
int maximum(period::period_type f) const;
bool is_in_daylight_saving_time() const;
private:
hold_ptr<abstract_calendar> impl_;
};
template<typename CharType>
std::basic_ostream<CharType> &operator<<(std::basic_ostream<CharType> &out,date_time const &t)
{
double time_point = t.time();
uint64_t display_flags = ios_info::get(out).display_flags();
if (
display_flags == flags::date
|| display_flags == flags::time
|| display_flags == flags::datetime
|| display_flags == flags::strftime
)
{
out << time_point;
}
else {
ios_info::get(out).display_flags(flags::datetime);
out << time_point;
ios_info::get(out).display_flags(display_flags);
}
return out;
}
template<typename CharType>
std::basic_istream<CharType> &operator>>(std::basic_istream<CharType> &in,date_time &t)
{
double v;
uint64_t display_flags = ios_info::get(in).display_flags();
if (
display_flags == flags::date
|| display_flags == flags::time
|| display_flags == flags::datetime
|| display_flags == flags::strftime
)
{
in >> v;
}
else {
ios_info::get(in).display_flags(flags::datetime);
in >> v;
ios_info::get(in).display_flags(display_flags);
}
if(!in.fail())
t.time(v);
return in;
}
class date_time_duration {
public:
date_time_duration(date_time const &first,date_time const &second) :
s_(first),
e_(second)
{
}
int get(period::period_type f) const
{
return start().difference(end(),f);
}
int operator / (period::period_type f) const
{
return start().difference(end(),f);
}
date_time const &start() const { return s_; }
date_time const &end() const { return e_; }
private:
date_time const &s_;
date_time const &e_;
};
inline date_time_duration operator-(date_time const &later,date_time const &earlier)
{
return date_time_duration(earlier,later);
}
namespace period {
inline int era(date_time const &dt) { return dt.get(era()); }
inline int year(date_time const &dt) { return dt.get(year()); }
inline int extended_year(date_time const &dt) { return dt.get(extended_year()); }
inline int month(date_time const &dt) { return dt.get(month()); }
inline int day(date_time const &dt) { return dt.get(day()); }
inline int day_of_year(date_time const &dt) { return dt.get(day_of_year()); }
inline int day_of_week(date_time const &dt) { return dt.get(day_of_week()); }
inline int day_of_week_in_month(date_time const &dt) { return dt.get(day_of_week_in_month()); }
inline int day_of_week_local(date_time const &dt) { return dt.get(day_of_week_local()); }
inline int hour(date_time const &dt) { return dt.get(hour()); }
inline int hour_12(date_time const &dt) { return dt.get(hour_12()); }
inline int am_pm(date_time const &dt) { return dt.get(am_pm()); }
inline int minute(date_time const &dt) { return dt.get(minute()); }
inline int second(date_time const &dt) { return dt.get(second()); }
inline int week_of_year(date_time const &dt) { return dt.get(week_of_year()); }
inline int week_of_month(date_time const &dt) { return dt.get(week_of_month()); }
inline int first_day_of_week(date_time const &dt) { return dt.get(first_day_of_week()); }
inline int era(date_time_duration const &dt) { return dt.get(era()); }
inline int year(date_time_duration const &dt) { return dt.get(year()); }
inline int extended_year(date_time_duration const &dt) { return dt.get(extended_year()); }
inline int month(date_time_duration const &dt) { return dt.get(month()); }
inline int day(date_time_duration const &dt) { return dt.get(day()); }
inline int day_of_year(date_time_duration const &dt) { return dt.get(day_of_year()); }
inline int day_of_week(date_time_duration const &dt) { return dt.get(day_of_week()); }
inline int day_of_week_in_month(date_time_duration const &dt) { return dt.get(day_of_week_in_month()); }
inline int day_of_week_local(date_time_duration const &dt) { return dt.get(day_of_week_local()); }
inline int hour(date_time_duration const &dt) { return dt.get(hour()); }
inline int hour_12(date_time_duration const &dt) { return dt.get(hour_12()); }
inline int am_pm(date_time_duration const &dt) { return dt.get(am_pm()); }
inline int minute(date_time_duration const &dt) { return dt.get(minute()); }
inline int second(date_time_duration const &dt) { return dt.get(second()); }
inline int week_of_year(date_time_duration const &dt) { return dt.get(week_of_year()); }
inline int week_of_month(date_time_duration const &dt) { return dt.get(week_of_month()); }
inline int first_day_of_week(date_time_duration const &dt) { return dt.get(first_day_of_week()); }
}
} // locale
} // boost
#ifdef BOOSTER_MSVC
#pragma warning(pop)
#endif
#endif
// vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4
booster::locale::period::marks::minute
minute [0..59]
Definition: date_time_facet.h:50
booster::locale::date_time::operator/
int operator/(period::period_type f) const
Definition: date_time.h:657
booster::locale::date_time_duration::start
date_time const & start() const
Definition: date_time.h:964
booster::locale::period::marks::week_of_year
The week number in the year.
Definition: date_time_facet.h:52
booster::locale::period::hour_12
period_type hour_12()
Definition: date_time.h:129
booster::locale::period::november
date_time_period november()
Definition: date_time.h:273
booster::locale::period::week_of_month
period_type week_of_month()
Definition: date_time.h:149
booster::locale::period::marks::second
second [0..59]
Definition: date_time_facet.h:51
booster::locale::calendar
this class provides an access to general calendar information.
Definition: date_time.h:473
booster::locale::period::monday
date_time_period monday()
Definition: date_time.h:286
booster::locale::period::hour
period_type hour()
Definition: date_time.h:125
booster::locale::date_time::operator+=
date_time const & operator+=(period::period_type f)
Definition: date_time.h:681
booster::locale::date_time_duration::end
date_time const & end() const
Definition: date_time.h:968
booster::locale::period::marks::week_of_month
The week number within current month.
Definition: date_time_facet.h:53
booster::runtime_error
Same as std::runtime_error but records stack trace.
Definition: backtrace.h:158
booster::locale::period::day_of_week_local
period_type day_of_week_local()
Definition: date_time.h:121
booster::locale::operator>>
std::basic_istream< CharType > & operator>>(std::basic_istream< CharType > &in, date_time &t)
Definition: date_time.h:901
booster::locale::period::year
period_type year()
Definition: date_time.h:87
booster::locale::period::minute
period_type minute()
Definition: date_time.h:137
booster::locale::period::sunday
date_time_period sunday()
Definition: date_time.h:282
booster::locale::date_time_period_set::add
void add(date_time_period f)
Definition: date_time.h:402
booster::locale::period::tuesday
date_time_period tuesday()
Definition: date_time.h:290
booster::locale::date_time_period_set::date_time_period_set
date_time_period_set(period::period_type f)
Definition: date_time.h:388
booster::locale::period::month
period_type month()
Definition: date_time.h:95
booster::locale::date_time::operator-
date_time operator-(period::period_type f) const
Definition: date_time.h:673
booster::locale::period::era
period_type era()
Definition: date_time.h:83
booster::locale::period::marks::day
The day of month, calendar specific, in Gregorian [1..31].
Definition: date_time_facet.h:37
booster::locale::operator<<
std::basic_ostream< CharType > & operator<<(std::basic_ostream< CharType > &out, date_time const &t)
Definition: date_time.h:874
booster::locale::period::marks::hour
24 clock hour [0..23]
Definition: date_time_facet.h:47
booster::locale::period::week_of_year
period_type week_of_year()
Definition: date_time.h:145
booster::locale::period::marks::day_of_week_local
Local day of week, for example in France Monday is 1, in US Sunday is 1, [1..7].
Definition: date_time_facet.h:46
booster::locale::date_time_duration::operator/
int operator/(period::period_type f) const
Definition: date_time.h:956
booster::locale::period::marks::first_day_of_week
First day of week, constant, for example Sunday in US = 1, Monday in France = 2.
Definition: date_time_facet.h:54
booster::locale::date_time_duration::date_time_duration
date_time_duration(date_time const &first, date_time const &second)
Definition: date_time.h:939
booster::locale::period::saturday
date_time_period saturday()
Definition: date_time.h:306
booster::locale::date_time_period_set::size
size_t size() const
Definition: date_time.h:413
booster::locale::period::january
date_time_period january()
Definition: date_time.h:233
booster::locale::period::pm
date_time_period pm()
Definition: date_time.h:314
booster::locale::date_time::operator<<
date_time operator<<(period::period_type f) const
Definition: date_time.h:696
booster::locale::date_time_error
This error is thrown in case of invalid state that occurred.
Definition: date_time.h:39
booster::locale::period::september
date_time_period september()
Definition: date_time.h:265
booster::locale::hold_ptr
a smart pointer similar to std::auto_ptr but it is non-copyable and the underlying object has the sam...
Definition: hold_ptr.h:18
booster::locale::date_time_duration
This class represents a period: a pair of two date_time objects.
Definition: date_time.h:932
booster::locale::period::february
date_time_period february()
Definition: date_time.h:237
booster::locale::date_time
this class represents a date time and allows to perform various operation according to the locale set...
Definition: date_time.h:590
booster::locale::ios_info::get
static ios_info & get(std::ios_base &ios)
booster::locale::period::may
date_time_period may()
Definition: date_time.h:249
booster::locale::period::march
date_time_period march()
Definition: date_time.h:241
booster::locale::period::august
date_time_period august()
Definition: date_time.h:261
booster::locale::period::december
date_time_period december()
Definition: date_time.h:277
booster::locale::date_time::operator>>=
date_time const & operator>>=(period::period_type f)
Definition: date_time.h:719
booster::locale::date_time::operator>>
date_time operator>>(period::period_type f) const
Definition: date_time.h:704
booster::locale::period::operator*
date_time_period operator*(period::period_type f, T v)
Definition: date_time.h:335
booster::locale::period::wednesday
date_time_period wednesday()
Definition: date_time.h:294
booster::locale::period::marks::year
Year, it is calendar specific, for example 2011 in Gregorian calendar.
Definition: date_time_facet.h:34
booster::locale::date_time_period::date_time_period
date_time_period(period::period_type f=period::period_type(), int v=1)
Definition: date_time.h:72
booster::locale::period::operator-
date_time_period operator-(period::period_type f)
Definition: date_time.h:326
booster::locale::date_time_error::date_time_error
date_time_error(std::string const &e)
Definition: date_time.h:44
booster::locale::period::invalid
period_type invalid()
Definition: date_time.h:79
booster::locale::period::marks::extended_year
Extended year for Gregorian/Julian calendars, where 1 BC == 0, 2 BC == -1.
Definition: date_time_facet.h:35
booster::out_of_range
Same as std::out_of_range but records stack trace.
Definition: backtrace.h:238
booster::locale::period::marks::invalid
Special invalid value, should not be used directly.
Definition: date_time_facet.h:32
booster::locale::period::marks::hour_12
12 clock hour [0..11]
Definition: date_time_facet.h:48
booster::locale::period::marks::day_of_year
The number of day in year, starting from 1, in Gregorian [1..366].
Definition: date_time_facet.h:38
booster::locale::operator-
date_time_period_set operator-(date_time_period_set const &a, date_time_period_set const &b)
Definition: date_time.h:457
booster::locale::period::october
date_time_period october()
Definition: date_time.h:269
booster::locale::date_time_period_set::date_time_period_set
date_time_period_set(date_time_period const &fl)
Definition: date_time.h:395
booster::locale::period::first_day_of_week
period_type first_day_of_week()
Definition: date_time.h:153
booster::locale::date_time::operator+
date_time operator+(period::period_type f) const
Definition: date_time.h:665
booster::locale::period::am
date_time_period am()
Definition: date_time.h:310
booster::locale::date_time::operator-=
date_time const & operator-=(period::period_type f)
Definition: date_time.h:688
booster::locale::period::friday
date_time_period friday()
Definition: date_time.h:302
booster::locale::period::marks::day_of_week
Definition: date_time_facet.h:39
booster::locale::period::period_type
This class holds a type that represents certain period of time like year, hour, second and so on...
Definition: date_time_facet.h:70
booster::locale::date_time_period::type
period::period_type type
The type of period, i.e. era, year, day etc.
Definition: date_time.h:58
booster::locale::date_time_period::operator-
date_time_period operator-() const
Definition: date_time.h:67
booster::locale::period::marks::am_pm
am or pm marker [0..1]
Definition: date_time_facet.h:49
booster::locale::date_time_period::operator+
date_time_period operator+() const
Definition: date_time.h:63
booster::locale::date_time_period_set::operator[]
date_time_period const & operator[](size_t n) const
Definition: date_time.h:428
booster::locale::period::second
period_type second()
Definition: date_time.h:141
booster::locale::date_time_period_set
this class that represents a set of periods,
Definition: date_time.h:376
booster::locale::date_time::difference
int difference(date_time const &other, period::period_type f) const
booster::locale::period::april
date_time_period april()
Definition: date_time.h:245
booster::locale::period::day_of_week_in_month
period_type day_of_week_in_month()
Definition: date_time.h:117
booster::locale::period::thursday
date_time_period thursday()
Definition: date_time.h:298
booster::locale::period::marks::day_of_week_in_month
Definition: date_time_facet.h:44
booster::locale::date_time_period
This class represents a pair of period_type and the integer values that describes its amount...
Definition: date_time.h:56
booster::locale::period::day_of_year
period_type day_of_year()
Definition: date_time.h:103
booster::locale::period::june
date_time_period june()
Definition: date_time.h:253
booster::locale::period::july
date_time_period july()
Definition: date_time.h:257
booster::locale::period::extended_year
period_type extended_year()
Definition: date_time.h:91
booster::locale::period::marks::era
Era i.e. AC, BC in Gregorian and Julian calendar, range [0,1].
Definition: date_time_facet.h:33
booster::locale::operator+
date_time_period_set operator+(date_time_period_set const &a, date_time_period_set const &b)
Definition: date_time.h:446
booster::locale::date_time::time
double time() const
booster::locale::date_time_duration::get
int get(period::period_type f) const
Definition: date_time.h:948
booster::locale::date_time::operator<<=
date_time const & operator<<=(period::period_type f)
Definition: date_time.h:712
booster::locale::ios_info::display_flags
void display_flags(uint64_t flags)
booster::locale::period::am_pm
period_type am_pm()
Definition: date_time.h:133
booster::locale::date_time_period_set::date_time_period_set
date_time_period_set()
Definition: date_time.h:382
booster::locale::date_time_period::value
int value
Definition: date_time.h:59
booster::locale::date_time::get
int get(period::period_type f) const
booster::locale::period::marks::month
The month of year, calendar specific, in Gregorian [0..11].
Definition: date_time_facet.h:36
booster::locale::as::time
std::ios_base & time(std::ios_base &ios)
Definition: formatting.h:328
booster::locale::period::day
period_type day()
Definition: date_time.h:99
booster::locale::period::day_of_week
period_type day_of_week()
Definition: date_time.h:112
booster::locale::period::operator+
date_time_period operator+(period::period_type f)
Definition: date_time.h:319