2 * This file is part of the YAZ toolkit:
3 * Copyright (c) 1998, Index Data.
4 * See the file LICENSE for details.
5 * Sebastian Hammer, Adam Dickmeiss
7 * Contribution by Ronald van Der Meer (RVDM):
8 * Databasix Information Systems B.V., Utrecht, The Netherlands.
11 * Revision 1.1 1999-11-30 13:47:11 adam
12 * Improved installation. Moved header files to include/yaz.
14 * Revision 1.2 1999/04/20 09:56:48 adam
15 * Added 'name' paramter to encoder/decoder routines (typedef Odr_fun).
16 * Modified all encoders/decoders to reflect this change.
18 * Revision 1.1 1998/02/10 15:31:52 adam
19 * Implemented date and time structure. Changed the Update Extended
27 #include <yaz/yconfig.h>
33 typedef struct Z_MonthAndDay
36 int *day; /* OPTIONAL */
39 typedef struct Z_Quarter
42 #define Z_Quarter_first 0
43 #define Z_Quarter_second 1
44 #define Z_Quarter_third 2
45 #define Z_Quarter_fourth 3
55 typedef struct Z_Season
58 #define Z_Season_winter 0
59 #define Z_Season_spring 1
60 #define Z_Season_summer 2
61 #define Z_Season_autumn 3
71 typedef struct Z_PartOfYear
74 #define Z_PartOfYear_monthAndDay 0
75 #define Z_PartOfYear_julianDay 1
76 #define Z_PartOfYear_weekNumber 2
77 #define Z_PartOfYear_quarter 3
78 #define Z_PartOfYear_season 4
81 Z_MonthAndDay *monthAndDay;
92 #define Z_Era_decade 0
93 #define Z_Era_century 1
94 #define Z_Era_millennium 2
103 typedef struct Z_DateFlags
105 Odr_null *circa; /* OPTIONAL */
106 Z_Era *era; /* OPTIONAL */
109 typedef struct Z_Date
112 Z_PartOfYear *partOfYear; /* OPTIONAL */
113 Z_DateFlags *flags; /* OPTIONAL */
116 typedef struct Z_Zone
119 #define Z_Zone_local 0
121 #define Z_Zone_utcOffset 2
130 typedef struct Z_Time
133 int *minute; /* OPTIONAL */
134 int *second; /* OPTIONAL */
135 Z_IntUnit *partOfSecond; /* OPTIONAL */
136 Z_Zone *zone; /* OPTIONAL */
139 typedef struct Z_DateTime
141 Z_Date *z3950Date; /* OPTIONAL */
142 Z_Time *z3950Time; /* OPTIONAL */
145 YAZ_EXPORT int z_DateTime(ODR o, Z_DateTime **p, int opt, const char *name);