Calendar. More...
Macros | |
#define | SECS_PER_HOUR (60L * 60L) |
#define | SECS_PER_DAY (SECS_PER_HOUR * 24L) |
#define | __isleap(year) ((year) % 4 == 0 && ((year) % 100 != 0 || (year) % 400 == 0)) |
#define | DIV(a, b) ((a) / (b) - ((a) % (b) < 0)) |
#define | LEAPS_THRU_END_OF(y) (DIV(y, 4) - DIV(y, 100) + DIV(y, 400)) |
Functions | |
char | istEinSchaltjahr (const int uJahr) |
Die Regel lautet: Alles, was durch 4 teilbar ist, ist ein Schaltjahr. Es sei denn, das Jahr ist durch 100 teilbar, dann ist es keins. Aber wenn es durch 400 teilbar ist, ist es doch wieder eins. More... | |
int | getAnzahlTageImMonat (const int uMonat, const int uJahr) |
int | getAnzahlTageImJahr (const int uJahr) |
int | getWochentag (const int uTag, const int uMonat, const int uJahr) |
int | getTagDesJahres (const int uTag, const int uMonat, const int uJahr) |
char | getKalenderwoche (const int uTag, const int uMonat, const int uJahr) |
int | offtime (int64_t *t, long int offset, struct tm *tp) |
Variables | |
const int | arrTageImMonat [13] |
const int | arrMonatsOffset [13] = {0, 1, 4, 3, 6, 1, 4, 6, 2, 5, 0, 3, 5} |
Calendar.
#define __isleap | ( | year | ) | ((year) % 4 == 0 && ((year) % 100 != 0 || (year) % 400 == 0)) |
#define DIV | ( | a, | |
b | |||
) | ((a) / (b) - ((a) % (b) < 0)) |
#define SECS_PER_DAY (SECS_PER_HOUR * 24L) |
#define SECS_PER_HOUR (60L * 60L) |