wibble  1.1
Functions
wibble::grcal::dtime Namespace Reference

Functions that work with int[3] time of day values. More...

Functions

void lowerbound (const int *src, int *dst)
 Make a copy of the time, filling in missing values with the lowest possible value they can have. More...
 
void lowerbound (int *val)
 Fill in the missing values of a time of day with the lowest possible value they can have. More...
 
int lowerbound_sec (const int *src)
 Convert a time of day in second, filling the missing values with the lowest possible value they can have. More...
 
void upperbound (const int *src, int *dst)
 Make a copy of the time, filling in missing values with the highest possible value they can have. More...
 
void upperbound (int *val)
 Fill in the missing values of a time of day with the highest possible value they can have. More...
 
int upperbound_sec (const int *src)
 Convert a time of day in second, filling the missing values with the highest possible value they can have. More...
 
int duration (const int *begin, const int *end)
 Give the duration in seconds of the interval between the end of begin and the beginning of end. More...
 
std::string tostring (const int *val)
 Format a time of day to a string. More...
 
std::string tostring (int val)
 Format a time of day expressed in seconds to a string. More...
 

Detailed Description

Functions that work with int[3] time of day values.

Function Documentation

◆ duration()

int wibble::grcal::dtime::duration ( const int *  begin,
const int *  end 
)

Give the duration in seconds of the interval between the end of begin and the beginning of end.

The result can be negative if end is an earlier time than begin.

References lowerbound_sec(), and upperbound_sec().

◆ lowerbound() [1/2]

void wibble::grcal::dtime::lowerbound ( const int *  src,
int *  dst 
)

Make a copy of the time, filling in missing values with the lowest possible value they can have.

◆ lowerbound() [2/2]

void wibble::grcal::dtime::lowerbound ( int *  val)

Fill in the missing values of a time of day with the lowest possible value they can have.

Referenced by wibble::grcal::date::duration().

◆ lowerbound_sec()

int wibble::grcal::dtime::lowerbound_sec ( const int *  src)

Convert a time of day in second, filling the missing values with the lowest possible value they can have.

Referenced by duration().

◆ tostring() [1/2]

std::string wibble::grcal::dtime::tostring ( const int *  val)

Format a time of day to a string.

◆ tostring() [2/2]

std::string wibble::grcal::dtime::tostring ( int  val)

Format a time of day expressed in seconds to a string.

◆ upperbound() [1/2]

void wibble::grcal::dtime::upperbound ( const int *  src,
int *  dst 
)

Make a copy of the time, filling in missing values with the highest possible value they can have.

◆ upperbound() [2/2]

void wibble::grcal::dtime::upperbound ( int *  val)

Fill in the missing values of a time of day with the highest possible value they can have.

Referenced by wibble::grcal::date::duration().

◆ upperbound_sec()

int wibble::grcal::dtime::upperbound_sec ( const int *  src)

Convert a time of day in second, filling the missing values with the highest possible value they can have.

Referenced by duration().