This class represents a period: a pair of two date_time objects. More...
#include <date_time.hpp>
Public Member Functions | |
date_time_duration (date_time const &first, date_time const &second) | |
Create an object were first represents earlier point on time line and second is later point. More... | |
int | get (period::period_type f) const |
find a difference in terms of period_type f More... | |
int | operator/ (period::period_type f) const |
Syntactic sugar for get(f) More... | |
date_time const & | start () const |
Get starting point. More... | |
date_time const & | end () const |
Get ending point. More... | |
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.
|
inline |
Create an object were first represents earlier point on time line and second is later point.
|
inline |
Get ending point.
Referenced by get(), and operator/().
|
inline |
find a difference in terms of period_type f
References boost::locale::date_time::difference(), end(), and start().
Referenced by boost::locale::period::am_pm(), boost::locale::period::day(), boost::locale::period::day_of_week(), boost::locale::period::day_of_week_in_month(), boost::locale::period::day_of_week_local(), boost::locale::period::day_of_year(), boost::locale::period::era(), boost::locale::period::extended_year(), boost::locale::period::first_day_of_week(), boost::locale::period::hour(), boost::locale::period::hour_12(), boost::locale::period::minute(), boost::locale::period::month(), boost::locale::period::second(), boost::locale::period::week_of_month(), boost::locale::period::week_of_year(), and boost::locale::period::year().
|
inline |
Syntactic sugar for get(f)
References boost::locale::date_time::difference(), end(), and start().
|
inline |
Get starting point.
Referenced by get(), and operator/().