Loading...
Searching...
No Matches
ledger::date_duration_t Struct Reference

#include <times.h>

Public Types

enum  skip_quantum_t {
  DAYS , WEEKS , MONTHS , QUARTERS ,
  YEARS
}
 

Public Member Functions

date_t add (const date_t &date) const
 
 date_duration_t ()
 
 date_duration_t (const date_duration_t &dur)
 
 date_duration_t (skip_quantum_t _quantum, int _length)
 
date_t subtract (const date_t &date) const
 
string to_string () const
 
 ~date_duration_t () throw ()
 

Static Public Member Functions

static date_t find_nearest (const date_t &date, skip_quantum_t skip)
 

Public Attributes

int length
 
enum ledger::date_duration_t::skip_quantum_t quantum
 

Detailed Description

Definition at line 157 of file times.h.

Member Enumeration Documentation

◆ skip_quantum_t

Enumerator
DAYS 
WEEKS 
MONTHS 
QUARTERS 
YEARS 

Definition at line 159 of file times.h.

Constructor & Destructor Documentation

◆ date_duration_t() [1/3]

ledger::date_duration_t::date_duration_t ( )
inline

Definition at line 164 of file times.h.

References TRACE_CTOR.

◆ date_duration_t() [2/3]

ledger::date_duration_t::date_duration_t ( skip_quantum_t _quantum,
int _length )
inline

Definition at line 167 of file times.h.

References TRACE_CTOR.

◆ date_duration_t() [3/3]

ledger::date_duration_t::date_duration_t ( const date_duration_t & dur)
inline

Definition at line 171 of file times.h.

References TRACE_CTOR.

◆ ~date_duration_t()

ledger::date_duration_t::~date_duration_t ( )
throw ( )
inline

Definition at line 175 of file times.h.

References TRACE_DTOR.

Member Function Documentation

◆ add()

date_t ledger::date_duration_t::add ( const date_t & date) const
inline

Definition at line 179 of file times.h.

References DAYS, length, MONTHS, quantum, QUARTERS, WEEKS, and YEARS.

◆ find_nearest()

static date_t ledger::date_duration_t::find_nearest ( const date_t & date,
skip_quantum_t skip )
static

◆ subtract()

date_t ledger::date_duration_t::subtract ( const date_t & date) const
inline

Definition at line 197 of file times.h.

References DAYS, length, MONTHS, quantum, QUARTERS, WEEKS, and YEARS.

◆ to_string()

string ledger::date_duration_t::to_string ( ) const
inline

Definition at line 215 of file times.h.

References DAYS, length, MONTHS, quantum, QUARTERS, WEEKS, and YEARS.

Member Data Documentation

◆ length

int ledger::date_duration_t::length

Definition at line 162 of file times.h.

Referenced by add(), subtract(), and to_string().

◆ quantum

enum ledger::date_duration_t::skip_quantum_t ledger::date_duration_t::quantum

Referenced by add(), subtract(), and to_string().


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