Boost  v1.57.0
doxygen for www.boost.org
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
boost::locale::calendar Class Reference

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

#include <date_time.hpp>

Public Member Functions

 calendar (std::ios_base &ios)
 Create calendar taking locale and timezone information from ios_base instance. More...
 
 calendar (std::locale const &l, std::string const &zone)
 Create calendar with locale l and time_zone zone. More...
 
 calendar (std::locale const &l)
 Create calendar with locale l and default timezone. More...
 
 calendar (std::string const &zone)
 Create calendar with default locale and timezone zone. More...
 
 calendar ()
 Create calendar with default locale and timezone. More...
 
 ~calendar ()
 
 calendar (calendar const &other)
 copy calendar More...
 
calendar const & operator= (calendar const &other)
 assign calendar More...
 
int minimum (period::period_type f) const
 Get minimum value for period f, For example for period::day it is 1. More...
 
int greatest_minimum (period::period_type f) const
 Get greatest possible minimum value for period f, For example for period::day it is 1, but may be different for other calendars. More...
 
int maximum (period::period_type f) const
 Get maximum value for period f, For example for Gregorian calendar's maximum period::day it is 31. More...
 
int least_maximum (period::period_type f) const
 Get least maximum value for period f, For example for Gregorian calendar's maximum period::day it is 28. More...
 
int first_day_of_week () const
 Get first day of week for specific calendar, for example for US it is 1 - Sunday for France it is 2 - Monday. More...
 
std::locale get_locale () const
 get calendar's locale More...
 
std::string get_time_zone () const
 get calendar's time zone More...
 
bool is_gregorian () const
 Check if the calendar is Gregorian. More...
 
bool operator== (calendar const &other) const
 Compare calendars for equivalence: i.e. More...
 
bool operator!= (calendar const &other) const
 Opposite of ==. More...
 

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

boost::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
boost::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
boost::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
boost::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
boost::locale::calendar::calendar ( )

Create calendar with default locale and timezone.

Note
throws std::bad_cast if global locale does not have calendar_facet facet installed
boost::locale::calendar::~calendar ( )
boost::locale::calendar::calendar ( calendar const &  other)

copy calendar

Member Function Documentation

int boost::locale::calendar::first_day_of_week ( ) const

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

std::locale boost::locale::calendar::get_locale ( ) const

get calendar's locale

std::string boost::locale::calendar::get_time_zone ( ) const

get calendar's time zone

int boost::locale::calendar::greatest_minimum ( period::period_type  f) const

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

bool boost::locale::calendar::is_gregorian ( ) const

Check if the calendar is Gregorian.

int boost::locale::calendar::least_maximum ( period::period_type  f) const

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

int boost::locale::calendar::maximum ( period::period_type  f) const

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

int boost::locale::calendar::minimum ( period::period_type  f) const

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

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

Opposite of ==.

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

assign calendar

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

Compare calendars for equivalence: i.e.

calendar types, time zones etc.

Friends And Related Function Documentation

friend class date_time
friend

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