#include <wibble/sys/macros.h>
#include <wibble/grcal/grcal.h>
#include <wibble/exception.h>
#include <ctime>
#include <sstream>
#include <iomanip>
Namespaces | |
namespace | wibble |
namespace | wibble::grcal |
namespace | wibble::grcal::date |
Functions that work with int[6] datetime values. | |
namespace | wibble::grcal::dtime |
Functions that work with int[3] time of day values. | |
Functions | |
int | wibble::grcal::date::daysinmonth (int year, int month) |
Return the number of days in a month. | |
int | wibble::grcal::date::daysinyear (int year) |
Return the number of days in a year. | |
void | wibble::grcal::date::easter (int year, int *month, int *day) |
Compute the day of Easter. | |
void | wibble::grcal::date::lowerbound (const int *src, int *dst) |
Make a copy of the datetime, filling in missing values with the lowest possible value they can have. | |
void | wibble::grcal::date::lowerbound (int *val) |
Fill in the missing values of a datetime with the lowest possible value they can have. | |
void | wibble::grcal::date::normalise (int *res) |
Normalise a datetime, in place. | |
void | wibble::grcal::date::upperbound (const int *src, int *dst) |
Make a copy of the datetime, filling in missing values with the highest possible value they can have. | |
void | wibble::grcal::date::upperbound (int *val) |
Fill in the missing values of a datetime with the highest possible value they can have. | |
long long int | wibble::grcal::date::secondsfrom (int year, const int *val) |
Convert the given time in seconds elapsed since the beginning of the given year. | |
long long int | wibble::grcal::date::duration (const int *begin, const int *end) |
Give the duration in seconds of the interval between begin and end. | |
void | wibble::grcal::date::mergetime (const int *date, const int *time, int *dst) |
Make a copy of date, with the time part taken from time. | |
void | wibble::grcal::date::mergetime (int *date, const int *time) |
Replace the time part of date with the values from time. | |
void | wibble::grcal::date::totm (const int *src, struct tm *dst) |
Copy the values from an int[6] datetime into a struct tm. | |
void | wibble::grcal::date::fromtm (const struct tm &src, int *dst, int count=6) |
Copy the values from a struct tm to the first count values of the int[6] dst. | |
std::string | wibble::grcal::date::tostring (const int *val) |
Convert a datetime to a string. | |
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. | |
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. | |
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. | |
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. | |
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. | |
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. | |
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. | |
std::string | wibble::grcal::dtime::tostring (const int *val) |
Format a time of day to a string. | |
std::string | wibble::grcal::dtime::tostring (int val) |
Format a time of day expressed in seconds to a string. |