datetime.h
Go to the documentation of this file.
00001 /******************************************************************************
00002   Copyright (c) 2010 by Turku PET Centre
00003 
00004   datetime.h
00005 
00006   Version:
00007   2010-05-19 Vesa Oikonen
00008     First created.
00009   2010-08-19 Vesa Oikonen
00010     Additional functions.
00011   2010-12-14 VO
00012     Added get_date().
00013 
00014 
00015 ******************************************************************************/
00016 #ifndef _DATETIME_H
00017 #define _DATETIME_H
00018 /*****************************************************************************/
00019 #include <time.h>
00020 /*****************************************************************************/
00021 extern int isdate(char *str);
00022 extern int isdate2(char *str, char *intdate);
00023 extern int isdate3(char *str, char *intdate);
00024 extern int isdate4(int dateint, int *year, int *month, int *day);
00025 extern int istime(char *str);
00026 extern int isdatetime(char *str, char *intdate);
00027 extern int get_datetime(char *str, struct tm *date);
00028 extern int get_date(char *str, struct tm *date);
00029 extern long int math_div(long int a, long int b);
00030 extern int isleapyear(long int year);
00031 extern long int leaps_between(long int year1, long int year2);
00032 extern void time_to_tm(time_t totalsecs, int offset, struct tm *result);
00033 /*****************************************************************************/
00034 #endif
00035