My Project
datetime.h
Go to the documentation of this file.
1 /******************************************************************************
2  Copyright (c) 2010 by Turku PET Centre
3 
4  datetime.h
5 
6  Version:
7  2010-05-19 Vesa Oikonen
8  First created.
9  2010-08-19 Vesa Oikonen
10  Additional functions.
11  2010-12-14 VO
12  Added get_date().
13 
14 
15 ******************************************************************************/
16 #ifndef _DATETIME_H
17 #define _DATETIME_H
18 /*****************************************************************************/
19 #include <time.h>
20 /*****************************************************************************/
21 extern int isdate(char *str);
22 extern int isdate2(char *str, char *intdate);
23 extern int isdate3(char *str, char *intdate);
24 extern int isdate4(int dateint, int *year, int *month, int *day);
25 extern int istime(char *str);
26 extern int isdatetime(char *str, char *intdate);
27 extern int get_datetime(char *str, struct tm *date);
28 extern int get_date(char *str, struct tm *date);
29 extern long int math_div(long int a, long int b);
30 extern int isleapyear(long int year);
31 extern long int leaps_between(long int year1, long int year2);
32 extern void time_to_tm(time_t totalsecs, int offset, struct tm *result);
33 /*****************************************************************************/
34 #endif
35 
int isleapyear(long int year)
int isdatetime(char *str, char *intdate)
Definition: datetime.c:199
long int math_div(long int a, long int b)
Definition: datetime.c:298
void time_to_tm(time_t totalsecs, int offset, struct tm *result)
Definition: datetime.c:329
int istime(char *str)
Definition: datetime.c:178
int get_date(char *str, struct tm *date)
Definition: datetime.c:267
int isdate4(int dateint, int *year, int *month, int *day)
Definition: datetime.c:149
int get_datetime(char *str, struct tm *date)
Definition: datetime.c:241
long int leaps_between(long int year1, long int year2)
Definition: datetime.c:316
int isdate3(char *str, char *intdate)
Definition: datetime.c:118
int isdate2(char *str, char *intdate)
Definition: datetime.c:88
int isdate(char *str)
Definition: datetime.c:66