Boost.Locale: boost::locale::date_time_duration Class Reference

| Boost.Locale

- Main Page
- Modules
- Namespaces
- Classes
- Files
- Examples

- Class List
- Class Hierarchy
- Class Members

Public Member Functions
boost::locale::date_time_duration Class Reference
Date, Time, Timezone and Calendar manipulations

This class represents a period: a pair of two date_time objects. More...

`#include <boost/locale/date_time.hpp>`

List of all members.

## Public Member Functions
| date_time_duration (date_time const &first, date_time const &second)
int | get (period::period_type f) const
int | operator/ (period::period_type f) const
date_time const & | start () const
date_time const & | end () const

## Detailed Description

This class represents a period: a pair of two date_time objects.

It is generally used as syntactic sugar to calculate difference between two dates.

Note: it stores references to the original objects, so it is not recommended to be used outside of the equation you calculate the difference in.

## Constructor & Destructor Documentation

boost::locale::date_time_duration::date_time_duration | ( | date_time const & | first,
|  | date_time const & | second
| ) |  | `[inline]`

Create an object were first represents earlier point on time line and second is later point.

## Member Function Documentation

date_time const& boost::locale::date_time_duration::end | ( |  | ) | const`[inline]`

Get ending point

int boost::locale::date_time_duration::get | ( | period::period_type | f | ) | const`[inline]`

find a difference in terms of period_type f

int boost::locale::date_time_duration::operator/ | ( | period::period_type | f | ) | const`[inline]`

Syntactic sugar for get(f)

date_time const& boost::locale::date_time_duration::start | ( |  | ) | const`[inline]`

Get starting point

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

- boost/locale/date_time.hpp