CppCMS
Public Member Functions | Friends
booster::locale::calendar Class Reference

this class provides an access to general calendar information. More...

#include <booster/booster/locale/date_time.h>

List of all members.

Public Member Functions

 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 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

Friends

class date_time

Detailed Description

this class provides an access to general calendar information.

This information is not connected to specific date but generic to locale, and timezone. It is used in obtaining general information about calendar and is essential for creation of date_time objects.


Constructor & Destructor Documentation

booster::locale::calendar::calendar ( std::ios_base &  ios)

Create calendar taking locale and timezone information from ios_base instance.

Note:
throws std::bad_cast if ios does not have a locale with installed calendar_facet facet installed
booster::locale::calendar::calendar ( std::locale const &  l,
std::string const &  zone 
)

Create calendar with locale l and time_zone zone

Note:
throws std::bad_cast if loc does not have calendar_facet facet installed
booster::locale::calendar::calendar ( std::locale const &  l)

Create calendar with locale l and default timezone

Note:
throws std::bad_cast if loc does not have calendar_facet facet installed
booster::locale::calendar::calendar ( std::string const &  zone)

Create calendar with default locale and timezone zone

Note:
throws std::bad_cast if global locale does not have calendar_facet facet installed

Create calendar with default locale and timezone

Note:
throws std::bad_cast if global locale does not have calendar_facet facet installed

copy calendar


Member Function Documentation

Get first day of week for specific calendar, for example for US it is 1 - Sunday for France it is 2 - Monday

get calendar's locale

get calendar's time zone

Get greatest possible minimum value for period f, For example for period::day it is 1, but may be different for other calendars.

Check if the calendar is Gregorian

Get least maximum value for period f, For example for Gregorian calendar's maximum period::day it is 28.

Get maximum value for period f, For example for Gregorian calendar's maximum period::day it is 31.

Get minimum value for period f, For example for period::day it is 1.

bool booster::locale::calendar::operator!= ( calendar const &  other) const

Opposite of ==

calendar const& booster::locale::calendar::operator= ( calendar const &  other)

assign calendar

bool booster::locale::calendar::operator== ( calendar const &  other) const

Compare calendars for equivalence: i.e. calendar types, time zones etc.


The documentation for this class was generated from the following file: