#include <times.h>
Inherits equality_comparable< date_interval_t >.
Public Member Functions | |
optional< date_t > | begin () const |
date_interval_t () | |
date_interval_t (const date_interval_t &other) | |
date_interval_t (const string &str) | |
void | dump (std::ostream &out) |
optional< date_t > | end () const |
bool | find_period (const date_t &date=(epoch ? epoch->date() :boost::gregorian::day_clock::local_day()), const bool align_intervals=false, const bool allow_shift=true) |
Find the current or next period containing date. | |
optional< date_t > | inclusive_end () const |
bool | is_valid () const |
operator bool () const | |
date_interval_t & | operator++ () |
bool | operator< (const date_interval_t &other) const |
bool | operator== (const date_interval_t &other) const |
void | parse (const string &str) |
void | resolve_end () |
void | stabilize (const optional< date_t > &date=none, bool align_intervals=false) |
bool | within_period (const date_t &date=(epoch ? epoch->date() :boost::gregorian::day_clock::local_day())) |
~date_interval_t () throw () | |
Static Public Member Functions | |
static date_t | add_duration (const date_t &date, const date_duration_t &duration) |
static date_t | subtract_duration (const date_t &date, const date_duration_t &duration) |
Public Attributes | |
bool | aligned |
optional< date_duration_t > | duration |
optional< date_t > | end_of_duration |
optional< date_t > | finish |
optional< date_t > | next |
optional< date_specifier_or_range_t > | range |
bool | since_specified = false |
optional< date_t > | start |
|
inlineexplicit |
Definition at line 456 of file times.h.
References TRACE_CTOR.
Definition at line 459 of file times.h.
References parse(), and TRACE_CTOR.
|
inline |
Definition at line 463 of file times.h.
References TRACE_CTOR.
|
inline |
Definition at line 474 of file times.h.
References TRACE_DTOR.
|
static |
Definition at line 491 of file times.h.
References ledger::downcast(), range, and start.
void ledger::date_interval_t::dump | ( | std::ostream & | out | ) |
Definition at line 494 of file times.h.
References ledger::downcast(), finish, and range.
bool ledger::date_interval_t::find_period | ( | const date_t & | date = (epoch ? epoch->date() :boost::gregorian::day_clock::local_day()), |
const bool | align_intervals = false, | ||
const bool | allow_shift = true ) |
Find the current or next period containing date.
Returns false if no such period can be found. If allow_shift is true, the default, then the interval may be shifted in time to find the period.
Referenced by within_period().
Definition at line 517 of file times.h.
References ledger::downcast(), and end_of_duration.
|
inline |
Definition at line 503 of file times.h.
References start.
Referenced by operator bool().
|
inline |
Definition at line 487 of file times.h.
References is_valid().
date_interval_t & ledger::date_interval_t::operator++ | ( | ) |
|
inline |
Definition at line 482 of file times.h.
References ledger::downcast(), and start.
|
inline |
Definition at line 478 of file times.h.
References ledger::downcast(), and start.
void ledger::date_interval_t::resolve_end | ( | ) |
void ledger::date_interval_t::stabilize | ( | const optional< date_t > & | date = none, |
bool | align_intervals = false ) |
|
static |
|
inline |
Definition at line 513 of file times.h.
References find_period().
optional<date_duration_t> ledger::date_interval_t::duration |
Definition at line 453 of file times.h.
Referenced by inclusive_end().
optional<date_specifier_or_range_t> ledger::date_interval_t::range |
Definition at line 448 of file times.h.
Referenced by begin(), is_valid(), operator<(), and operator==().