gwenhywfar
4.7.0beta
Main Page
Related Pages
Modules
Data Structures
Files
File List
Globals
src
os
gwendate.h
Go to the documentation of this file.
1
/***************************************************************************
2
begin : Tue Jul 07 2009
3
copyright : (C) 2009 by Martin Preuss
4
email : martin@libchipcard.de
5
6
***************************************************************************
7
* *
8
* This library is free software; you can redistribute it and/or *
9
* modify it under the terms of the GNU Lesser General Public *
10
* License as published by the Free Software Foundation; either *
11
* version 2.1 of the License, or (at your option) any later version. *
12
* *
13
* This library is distributed in the hope that it will be useful, *
14
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
15
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
16
* Lesser General Public License for more details. *
17
* *
18
* You should have received a copy of the GNU Lesser General Public *
19
* License along with this library; if not, write to the Free Software *
20
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, *
21
* MA 02111-1307 USA *
22
* *
23
***************************************************************************/
24
25
#ifndef GWEN_DATE_H
26
#define GWEN_DATE_H
27
28
29
#include <gwenhywfar/gwenhywfarapi.h>
30
#include <gwenhywfar/types.h>
31
#include <gwenhywfar/buffer.h>
32
33
34
typedef
struct
GWEN_DATE
GWEN_DATE
;
35
36
37
#include <gwenhywfar/gwentime.h>
38
39
#include <time.h>
40
41
42
#ifdef __cplusplus
43
extern
"C"
{
44
#endif
45
46
47
48
55
GWENHYWFAR_API
GWEN_DATE
*
GWEN_Date_fromGregorian
(
int
y,
int
m,
int
d);
56
61
GWENHYWFAR_API
GWEN_DATE
*
GWEN_Date_fromJulian
(
int
julian);
62
66
GWENHYWFAR_API
GWEN_DATE
*
GWEN_Date_CurrentDate
(
void
);
67
68
GWENHYWFAR_API
GWEN_DATE
*
GWEN_Date_fromString
(
const
char
*s);
69
70
GWENHYWFAR_API
GWEN_DATE
*
GWEN_Date_dup
(
const
GWEN_DATE
*ogd);
71
72
GWENHYWFAR_API
GWEN_DATE
*
GWEN_Date_fromTime
(
const
GWEN_TIME
*ti);
73
74
GWENHYWFAR_API
GWEN_DATE
*
GWEN_Date_fromLocalTime
(time_t t);
75
GWENHYWFAR_API
GWEN_DATE
*
GWEN_Date_fromGmTime
(time_t t);
76
77
78
GWENHYWFAR_API
GWEN_DATE
*
GWEN_Date_fromStringWithTemplate
(
const
char
*s,
const
char
*tmpl);
79
GWENHYWFAR_API
int
GWEN_Date_toStringWithTemplate
(
const
GWEN_DATE
*t,
80
const
char
*tmpl,
81
GWEN_BUFFER
*buf);
82
83
87
GWENHYWFAR_API
void
GWEN_Date_free
(
GWEN_DATE
*gd);
88
89
90
91
GWENHYWFAR_API
const
char
*
GWEN_Date_GetString
(
const
GWEN_DATE
*gd);
92
93
94
GWENHYWFAR_API
int
GWEN_Date_DaysInMonth
(
const
GWEN_DATE
*gd);
95
100
GWENHYWFAR_API
int
GWEN_Date_DaysInYear
(
const
GWEN_DATE
*gd);
101
102
GWENHYWFAR_API
int
GWEN_Date_GetYear
(
const
GWEN_DATE
*gd);
103
GWENHYWFAR_API
int
GWEN_Date_GetMonth
(
const
GWEN_DATE
*gd);
104
GWENHYWFAR_API
int
GWEN_Date_GetDay
(
const
GWEN_DATE
*gd);
105
GWENHYWFAR_API
int
GWEN_Date_WeekDay
(
const
GWEN_DATE
*gd);
106
GWENHYWFAR_API
int
GWEN_Date_GetJulian
(
const
GWEN_DATE
*gd);
107
108
109
GWENHYWFAR_API
int
GWEN_Date_IsLeapYear
(
int
y);
110
GWENHYWFAR_API
int
GWEN_Date_Compare
(
const
GWEN_DATE
*gd1,
const
GWEN_DATE
*gd0);
111
GWENHYWFAR_API
int
GWEN_Date_Diff
(
const
GWEN_DATE
*gd1,
const
GWEN_DATE
*gd0);
112
113
114
GWENHYWFAR_API
int
GWEN_Date_toDb
(
const
GWEN_DATE
*dt,
GWEN_DB_NODE
*db);
115
GWENHYWFAR_API
GWEN_DATE
*
GWEN_Date_fromDb
(
GWEN_DB_NODE
*db);
116
117
118
#ifdef __cplusplus
119
}
120
#endif
121
122
123
124
#endif
125
126
Generated on Wed Aug 21 2013 18:32:10 for gwenhywfar by
1.8.4