libtime++: Date and time calculation
timeutil.c File Reference
#include <stdio.h>
#include <stddef.h>
#include <stdlib.h>
#include <timeutil.h>
Include dependency graph for timeutil.c:

Go to the source code of this file.

Macros

#define TU_EXIT_FAILURE   1
 
#define TU_CHECKERROR(EXPR, SUB, STR)
 

Functions

void timeutil_clear (timeutil_Ttime *td)
 
char * timeutil_print (timeutil_Ttime td)
 
void timeutil_finish (timeutil_Ttime *td)
 
long int timeutil_doy (timeutil_Ttime td)
 
int timeutil_is_leap (long int year)
 
void timeutil_date (timeutil_Ttime *td, long int doy)
 
void timeutil_norm (timeutil_Ttime *td)
 
void timeutil_add (timeutil_Ttime *sum, timeutil_Ttime td1, timeutil_Ttime td2)
 
int timeutil_compare (timeutil_Ttime time1, timeutil_Ttime time2)
 

Variables

static int timeutil_DaysInYear [13] ={0,31,28,31,30,31,30,31,31,30,31,30,31}
 
static int timeutil_DaysInLeapYear [13] ={0,31,29,31,30,31,30,31,31,30,31,30,31}
 
static long int timeutil_limits [TIMEUTIL_N_ELEMENTS] = {-1L, -1L, -1L, -1L, 24L, 60L, 60L, 1000L, 1000L}