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/*****************************************************************************/
21extern int isdate(char *str);
22extern int isdate2(char *str, char *intdate);
23extern int isdate3(char *str, char *intdate);
24extern int isdate4(int dateint, int *year, int *month, int *day);
25extern int istime(char *str);
26extern int isdatetime(char *str, char *intdate);
27extern int get_datetime(char *str, struct tm *date);
28extern int get_date(char *str, struct tm *date);
29extern long int math_div(long int a, long int b);
30extern int isleapyear(long int year);
31extern long int leaps_between(long int year1, long int year2);
32extern void time_to_tm(time_t totalsecs, int offset, struct tm *result);
33/*****************************************************************************/
34#endif
35
int isdate2(char *str, char *intdate)
Definition: datetime.c:88
int isleapyear(long int year)
int isdate(char *str)
Definition: datetime.c:66
void time_to_tm(time_t totalsecs, int offset, struct tm *result)
Definition: datetime.c:329
int get_datetime(char *str, struct tm *date)
Definition: datetime.c:241
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
long int math_div(long int a, long int b)
Definition: datetime.c:298
int isdatetime(char *str, char *intdate)
Definition: datetime.c:199
int isdate3(char *str, char *intdate)
Definition: datetime.c:118
long int leaps_between(long int year1, long int year2)
Definition: datetime.c:316