2#ifndef WIBBLE_GRCAL_GRCAL_H
3#define WIBBLE_GRCAL_GRCAL_H
158long long int duration(
const int* begin,
const int* end);
188std::string
tostring(
const int* val);
240int duration(
const int* begin,
const int* end);
245std::string
tostring(
const int* val);
void totm(const int *src, struct tm *dst)
Copy the values from an int[6] datetime into a struct tm.
Definition grcal.cpp:281
std::string tostring(const int *val)
Convert a datetime to a string.
Definition grcal.cpp:319
int daysinyear(int year)
Return the number of days in a year.
Definition grcal.cpp:84
long long int secondsfrom(int year, const int *val)
Convert the given time in seconds elapsed since the beginning of the given year.
Definition grcal.cpp:229
void upperbound(const int *src, int *dst)
Make a copy of the datetime, filling in missing values with the highest possible value they can have.
Definition grcal.cpp:191
void now(int *dst)
Fill in an int[6] with the UTC values for now.
void lowerbound(const int *src, int *dst)
Make a copy of the datetime, filling in missing values with the lowest possible value they can have.
Definition grcal.cpp:112
void mergetime(const int *date, const int *time, int *dst)
Make a copy of date, with the time part taken from time.
Definition grcal.cpp:264
void fromtm(const struct tm &src, int *dst, int count)
Copy the values from a struct tm to the first count values of the int[6] dst.
Definition grcal.cpp:291
void today(int *dst)
Fill in an int[6] with the UTC values for today (leaving the time of day elements to -1)
int daysinmonth(int year, int month)
Return the number of days in a month.
Definition grcal.cpp:57
void normalise(int *res)
Normalise a datetime, in place.
Definition grcal.cpp:145
void easter(int year, int *month, int *day)
Compute the day of Easter.
Definition grcal.cpp:91
long long int duration(const int *begin, const int *end)
Give the duration in seconds of the interval between begin and end.
Definition grcal.cpp:245
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.
Definition grcal.cpp:341
std::string tostring(const int *val)
Format a time of day to a string.
Definition grcal.cpp:391
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.
Definition grcal.cpp:386
int lowerbound_sec(const int *src)
Convert a time of day in second, filling the missing values with the lowest possible value they can h...
Definition grcal.cpp:353
int upperbound_sec(const int *src)
Convert a time of day in second, filling the missing values with the highest possible value they can ...
Definition grcal.cpp:377
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.
Definition grcal.cpp:363