CppCMS
Namespaces | Classes | Functions
booster::locale::period Namespace Reference

Namespace that contains various types for manipulation with dates. More...

Namespaces

 marks
 This namespace holds a enum of various period types like era, year, month, etc..
 

Classes

class  period_type
 This class holds a type that represents certain period of time like year, hour, second and so on. More...
 

Functions

period_type invalid ()
 
period_type era ()
 
period_type year ()
 
period_type extended_year ()
 
period_type month ()
 
period_type day ()
 
period_type day_of_year ()
 
period_type day_of_week ()
 
period_type day_of_week_in_month ()
 
period_type day_of_week_local ()
 
period_type hour ()
 
period_type hour_12 ()
 
period_type am_pm ()
 
period_type minute ()
 
period_type second ()
 
period_type week_of_year ()
 
period_type week_of_month ()
 
period_type first_day_of_week ()
 
date_time_period era (int v)
 
date_time_period year (int v)
 
date_time_period extended_year (int v)
 
date_time_period month (int v)
 
date_time_period day (int v)
 
date_time_period day_of_year (int v)
 
date_time_period day_of_week (int v)
 
date_time_period day_of_week_in_month (int v)
 
date_time_period day_of_week_local (int v)
 
date_time_period hour (int v)
 
date_time_period hour_12 (int v)
 
date_time_period am_pm (int v)
 
date_time_period minute (int v)
 
date_time_period second (int v)
 
date_time_period week_of_year (int v)
 
date_time_period week_of_month (int v)
 
date_time_period first_day_of_week (int v)
 
date_time_period january ()
 
date_time_period february ()
 
date_time_period march ()
 
date_time_period april ()
 
date_time_period may ()
 
date_time_period june ()
 
date_time_period july ()
 
date_time_period august ()
 
date_time_period september ()
 
date_time_period october ()
 
date_time_period november ()
 
date_time_period december ()
 
date_time_period sunday ()
 
date_time_period monday ()
 
date_time_period tuesday ()
 
date_time_period wednesday ()
 
date_time_period thursday ()
 
date_time_period friday ()
 
date_time_period saturday ()
 
date_time_period am ()
 
date_time_period pm ()
 
date_time_period operator+ (period::period_type f)
 
date_time_period operator- (period::period_type f)
 
template<typename T >
date_time_period operator* (period::period_type f, T v)
 
template<typename T >
date_time_period operator* (T v, period::period_type f)
 
template<typename T >
date_time_period operator* (T v, date_time_period f)
 
template<typename T >
date_time_period operator* (date_time_period f, T v)
 
int era (date_time const &dt)
 
int year (date_time const &dt)
 
int extended_year (date_time const &dt)
 
int month (date_time const &dt)
 
int day (date_time const &dt)
 
int day_of_year (date_time const &dt)
 
int day_of_week (date_time const &dt)
 
int day_of_week_in_month (date_time const &dt)
 
int day_of_week_local (date_time const &dt)
 
int hour (date_time const &dt)
 
int hour_12 (date_time const &dt)
 
int am_pm (date_time const &dt)
 
int minute (date_time const &dt)
 
int second (date_time const &dt)
 
int week_of_year (date_time const &dt)
 
int week_of_month (date_time const &dt)
 
int first_day_of_week (date_time const &dt)
 
int era (date_time_duration const &dt)
 
int year (date_time_duration const &dt)
 
int extended_year (date_time_duration const &dt)
 
int month (date_time_duration const &dt)
 
int day (date_time_duration const &dt)
 
int day_of_year (date_time_duration const &dt)
 
int day_of_week (date_time_duration const &dt)
 
int day_of_week_in_month (date_time_duration const &dt)
 
int day_of_week_local (date_time_duration const &dt)
 
int hour (date_time_duration const &dt)
 
int hour_12 (date_time_duration const &dt)
 
int am_pm (date_time_duration const &dt)
 
int minute (date_time_duration const &dt)
 
int second (date_time_duration const &dt)
 
int week_of_year (date_time_duration const &dt)
 
int week_of_month (date_time_duration const &dt)
 
int first_day_of_week (date_time_duration const &dt)
 

Detailed Description

Namespace that contains various types for manipulation with dates.

Function Documentation

date_time_period booster::locale::period::am ( )
inline

Get predefined constant for AM (Ante Meridiem)

References am().

Referenced by am().

period_type booster::locale::period::am_pm ( )
inline

Get period_type for: am or pm marker [0..1]

date_time_period booster::locale::period::am_pm ( int  v)
inline

Get date_time_period for: am or pm marker [0..1]

int booster::locale::period::am_pm ( date_time const &  dt)
inline

Extract from date_time numerical value of am or pm marker [0..1]

References booster::locale::date_time::get().

int booster::locale::period::am_pm ( date_time_duration const &  dt)
inline

Extract from date_time_duration numerical value of duration in am or pm markers

References booster::locale::date_time_duration::get().

date_time_period booster::locale::period::april ( )
inline

Get predefined constant for April

References april().

Referenced by april().

date_time_period booster::locale::period::august ( )
inline

Get predefined constant for August

References august().

Referenced by august().

period_type booster::locale::period::day ( )
inline

Get period_type for: The day of month, calendar specific, in Gregorian [1..31]

date_time_period booster::locale::period::day ( int  v)
inline

Get date_time_period for: The day of month, calendar specific, in Gregorian [1..31]

int booster::locale::period::day ( date_time const &  dt)
inline

Extract from date_time numerical value of The day of month, calendar specific, in Gregorian [1..31]

References booster::locale::date_time::get().

int booster::locale::period::day ( date_time_duration const &  dt)
inline

Extract from date_time_duration numerical value of duration in days of month

References booster::locale::date_time_duration::get().

period_type booster::locale::period::day_of_week ( )
inline

Get period_type for: Day of week, Sunday=1, Monday=2,..., Saturday=7.

Note that updating this value respects local day of week, so for example, If first day of week is Monday and the current day is Tuesday then setting the value to Sunday (1) would forward the date by 5 days forward and not backward by two days as it could be expected if the numbers were taken as is.

date_time_period booster::locale::period::day_of_week ( int  v)
inline

Get date_time_period for: Day of week, Sunday=1, Monday=2,..., Saturday=7.

Note that updating this value respects local day of week, so for example, If first day of week is Monday and the current day is Tuesday then setting the value to Sunday (1) would forward the date by 5 days forward and not backward by two days as it could be expected if the numbers were taken as is.

int booster::locale::period::day_of_week ( date_time const &  dt)
inline

Extract from date_time numerical value of Day of week, Sunday=1, Monday=2,..., Saturday=7.

Note that updating this value respects local day of week, so for example, If first day of week is Monday and the current day is Tuesday then setting the value to Sunday (1) would forward the date by 5 days forward and not backward by two days as it could be expected if the numbers were taken as is.

References booster::locale::date_time::get().

int booster::locale::period::day_of_week ( date_time_duration const &  dt)
inline

Extract from date_time_duration numerical value of duration in days of week

References booster::locale::date_time_duration::get().

period_type booster::locale::period::day_of_week_in_month ( )
inline

Get period_type for: Original number of the day of the week in month. For example 1st Sunday, 2nd Sunday, etc. in Gregorian [1..5]

date_time_period booster::locale::period::day_of_week_in_month ( int  v)
inline

Get date_time_period for: Original number of the day of the week in month. For example 1st Sunday, 2nd Sunday, etc. in Gregorian [1..5]

int booster::locale::period::day_of_week_in_month ( date_time const &  dt)
inline

Extract from date_time numerical value of Original number of the day of the week in month. For example 1st Sunday, 2nd Sunday, etc. in Gregorian [1..5]

References booster::locale::date_time::get().

int booster::locale::period::day_of_week_in_month ( date_time_duration const &  dt)
inline

Extract from date_time_duration numerical value of duration in original number of the day of the week in month

References booster::locale::date_time_duration::get().

period_type booster::locale::period::day_of_week_local ( )
inline

Get period_type for: Local day of week, for example in France Monday is 1, in US Sunday is 1, [1..7]

date_time_period booster::locale::period::day_of_week_local ( int  v)
inline

Get date_time_period for: Local day of week, for example in France Monday is 1, in US Sunday is 1, [1..7]

int booster::locale::period::day_of_week_local ( date_time const &  dt)
inline

Extract from date_time numerical value of Local day of week, for example in France Monday is 1, in US Sunday is 1, [1..7]

References booster::locale::date_time::get().

int booster::locale::period::day_of_week_local ( date_time_duration const &  dt)
inline

Extract from date_time_duration numerical value of duration in local day of week

References booster::locale::date_time_duration::get().

period_type booster::locale::period::day_of_year ( )
inline

Get period_type for: The number of day in year, starting from 1, in Gregorian [1..366]

date_time_period booster::locale::period::day_of_year ( int  v)
inline

Get date_time_period for: The number of day in year, starting from 1, in Gregorian [1..366]

int booster::locale::period::day_of_year ( date_time const &  dt)
inline

Extract from date_time numerical value of The number of day in year, starting from 1, in Gregorian [1..366]

References booster::locale::date_time::get().

int booster::locale::period::day_of_year ( date_time_duration const &  dt)
inline

Extract from date_time_duration numerical value of duration in days of year

References booster::locale::date_time_duration::get().

date_time_period booster::locale::period::december ( )
inline

Get predefined constant for December

References december().

Referenced by december().

period_type booster::locale::period::era ( )
inline

Get period_type for: Era i.e. AC, BC in Gregorian and Julian calendar, range [0,1]

date_time_period booster::locale::period::era ( int  v)
inline

Get date_time_period for: Era i.e. AC, BC in Gregorian and Julian calendar, range [0,1]

int booster::locale::period::era ( date_time const &  dt)
inline

Extract from date_time numerical value of Era i.e. AC, BC in Gregorian and Julian calendar, range [0,1]

References booster::locale::date_time::get().

int booster::locale::period::era ( date_time_duration const &  dt)
inline

Extract from date_time_duration numerical value of duration in Era i.e. AC, BC in Gregorian and Julian calendar, range [0,1]

References booster::locale::date_time_duration::get().

period_type booster::locale::period::extended_year ( )
inline

Get period_type for: Extended year for Gregorian/Julian calendars, where 1 BC == 0, 2 BC == -1.

date_time_period booster::locale::period::extended_year ( int  v)
inline

Get date_time_period for: Extended year for Gregorian/Julian calendars, where 1 BC == 0, 2 BC == -1.

int booster::locale::period::extended_year ( date_time const &  dt)
inline

Extract from date_time numerical value of Extended year for Gregorian/Julian calendars, where 1 BC == 0, 2 BC == -1.

References booster::locale::date_time::get().

int booster::locale::period::extended_year ( date_time_duration const &  dt)
inline

Extract from date_time_duration numerical value of duration in extended years (for Gregorian/Julian calendars, where 1 BC == 0, 2 BC == -1).

References booster::locale::date_time_duration::get().

date_time_period booster::locale::period::february ( )
inline

Get predefined constant for February

References february().

Referenced by february().

period_type booster::locale::period::first_day_of_week ( )
inline

Get period_type for: First day of week, constant, for example Sunday in US = 1, Monday in France = 2

date_time_period booster::locale::period::first_day_of_week ( int  v)
inline

Get date_time_period for: First day of week, constant, for example Sunday in US = 1, Monday in France = 2

int booster::locale::period::first_day_of_week ( date_time const &  dt)
inline

Extract from date_time numerical value of First day of week, constant, for example Sunday in US = 1, Monday in France = 2

References booster::locale::date_time::get().

int booster::locale::period::first_day_of_week ( date_time_duration const &  dt)
inline

Extract from date_time_duration numerical value of duration in the first day of week

References booster::locale::date_time_duration::get().

date_time_period booster::locale::period::friday ( )
inline

Get predefined constant for Friday

References friday().

Referenced by friday().

period_type booster::locale::period::hour ( )
inline

Get period_type for: 24 clock hour [0..23]

date_time_period booster::locale::period::hour ( int  v)
inline

Get date_time_period for: 24 clock hour [0..23]

int booster::locale::period::hour ( date_time const &  dt)
inline

Extract from date_time numerical value of 24 clock hour [0..23]

References booster::locale::date_time::get().

int booster::locale::period::hour ( date_time_duration const &  dt)
inline

Extract from date_time_duration numerical value of duration in hours

References booster::locale::date_time_duration::get().

period_type booster::locale::period::hour_12 ( )
inline

Get period_type for: 12 clock hour [0..11]

date_time_period booster::locale::period::hour_12 ( int  v)
inline

Get date_time_period for: 12 clock hour [0..11]

int booster::locale::period::hour_12 ( date_time const &  dt)
inline

Extract from date_time numerical value of 12 clock hour [0..11]

References booster::locale::date_time::get().

int booster::locale::period::hour_12 ( date_time_duration const &  dt)
inline

Extract from date_time_duration numerical value of duration in 12 clock hours

References booster::locale::date_time_duration::get().

period_type booster::locale::period::invalid ( )
inline

Get period_type for: special invalid value, should not be used directly

date_time_period booster::locale::period::january ( )
inline

Get predefined constant for January

References january().

Referenced by january().

date_time_period booster::locale::period::july ( )
inline

Get predefined constant for July

References july().

Referenced by july().

date_time_period booster::locale::period::june ( )
inline

Get predefined constant for June

References june().

Referenced by june().

date_time_period booster::locale::period::march ( )
inline

Get predefined constant for March

References march().

Referenced by march().

date_time_period booster::locale::period::may ( )
inline

Get predefined constant for May

References may().

Referenced by may().

period_type booster::locale::period::minute ( )
inline

Get period_type for: minute [0..59]

date_time_period booster::locale::period::minute ( int  v)
inline

Get date_time_period for: minute [0..59]

int booster::locale::period::minute ( date_time const &  dt)
inline

Extract from date_time numerical value of minute [0..59]

References booster::locale::date_time::get().

int booster::locale::period::minute ( date_time_duration const &  dt)
inline

Extract from date_time_duration numerical value of duration in minutes

References booster::locale::date_time_duration::get().

date_time_period booster::locale::period::monday ( )
inline

Get predefined constant for Monday

References monday().

Referenced by monday().

period_type booster::locale::period::month ( )
inline

Get period_type for: The month of year, calendar specific, in Gregorian [0..11]

date_time_period booster::locale::period::month ( int  v)
inline

Get date_time_period for: The month of year, calendar specific, in Gregorian [0..11]

int booster::locale::period::month ( date_time const &  dt)
inline

Extract from date_time numerical value of The month of year, calendar specific, in Gregorian [0..11]

References booster::locale::date_time::get().

int booster::locale::period::month ( date_time_duration const &  dt)
inline

Extract from date_time_duration numerical value of duration in months

References booster::locale::date_time_duration::get().

date_time_period booster::locale::period::november ( )
inline

Get predefined constant for November

References november().

Referenced by november().

date_time_period booster::locale::period::october ( )
inline

Get predefined constant for October

References october().

Referenced by october().

template<typename T >
date_time_period booster::locale::period::operator* ( period::period_type  f,
v 
)

Create date_time_period of type f with value v.

References operator*().

Referenced by operator*().

template<typename T >
date_time_period booster::locale::period::operator* ( v,
period::period_type  f 
)

Create date_time_period of type f with value v.

References operator*().

template<typename T >
date_time_period booster::locale::period::operator* ( v,
date_time_period  f 
)
template<typename T >
date_time_period booster::locale::period::operator* ( date_time_period  f,
v 
)
date_time_period booster::locale::period::operator+ ( period::period_type  f)
inline

convert period_type to date_time_period(f,1)

date_time_period booster::locale::period::operator- ( period::period_type  f)
inline

convert period_type to date_time_period(f,-1)

date_time_period booster::locale::period::pm ( )
inline

Get predefined constant for PM (Post Meridiem)

References pm().

Referenced by pm().

date_time_period booster::locale::period::saturday ( )
inline

Get predefined constant for Saturday

References saturday().

Referenced by saturday().

period_type booster::locale::period::second ( )
inline

Get period_type for: second [0..59]

date_time_period booster::locale::period::second ( int  v)
inline

Get date_time_period for: second [0..59]

int booster::locale::period::second ( date_time const &  dt)
inline

Extract from date_time numerical value of second [0..59]

References booster::locale::date_time::get().

int booster::locale::period::second ( date_time_duration const &  dt)
inline

Extract from date_time_duration numerical value of duration in seconds

References booster::locale::date_time_duration::get().

date_time_period booster::locale::period::september ( )
inline

Get predefined constant for September

References september().

Referenced by september().

date_time_period booster::locale::period::sunday ( )
inline

Get predefined constant for Sunday

References sunday().

Referenced by sunday().

date_time_period booster::locale::period::thursday ( )
inline

Get predefined constant for Thursday

References thursday().

Referenced by thursday().

date_time_period booster::locale::period::tuesday ( )
inline

Get predefined constant for Tuesday

References tuesday().

Referenced by tuesday().

date_time_period booster::locale::period::wednesday ( )
inline

Get predefined constant for Wednesday

References wednesday().

Referenced by wednesday().

period_type booster::locale::period::week_of_month ( )
inline

Get period_type for: The week number within current month

date_time_period booster::locale::period::week_of_month ( int  v)
inline

Get date_time_period for: The week number within current month

int booster::locale::period::week_of_month ( date_time const &  dt)
inline

Extract from date_time numerical value of The week number within current month

References booster::locale::date_time::get().

int booster::locale::period::week_of_month ( date_time_duration const &  dt)
inline

Extract from date_time_duration numerical value of duration in The week number within current month

References booster::locale::date_time_duration::get().

period_type booster::locale::period::week_of_year ( )
inline

Get period_type for: The week number in the year

date_time_period booster::locale::period::week_of_year ( int  v)
inline

Get date_time_period for: The week number in the year

int booster::locale::period::week_of_year ( date_time const &  dt)
inline

Extract from date_time numerical value of The week number in the year

References booster::locale::date_time::get().

int booster::locale::period::week_of_year ( date_time_duration const &  dt)
inline

Extract from date_time_duration numerical value of duration in the week number in the year

References booster::locale::date_time_duration::get().

period_type booster::locale::period::year ( )
inline

Get period_type for: Year, it is calendar specific, for example 2011 in Gregorian calendar.

date_time_period booster::locale::period::year ( int  v)
inline

Get date_time_period for: Year, it is calendar specific, for example 2011 in Gregorian calendar.

int booster::locale::period::year ( date_time const &  dt)
inline

Extract from date_time numerical value of Year, it is calendar specific, for example 2011 in Gregorian calendar.

References booster::locale::date_time::get().

int booster::locale::period::year ( date_time_duration const &  dt)
inline

Extract from date_time_duration numerical value of duration in years

References booster::locale::date_time_duration::get().