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 2000-10-03 12:55:50 adam
12 * Removed several auto-generated files from CVS.
14 * Revision 1.1 1999/11/30 13:47:11 adam
15 * Improved installation. Moved header files to include/yaz.
17 * Revision 1.2 1999/04/20 09:56:48 adam
18 * Added 'name' paramter to encoder/decoder routines (typedef Odr_fun).
19 * Modified all encoders/decoders to reflect this change.
21 * Revision 1.1 1998/02/10 15:31:52 adam
22 * Implemented date and time structure. Changed the Update Extended
30 #include <yaz/yconfig.h>
36 typedef struct Z_MonthAndDay
39 int *day; /* OPTIONAL */
42 typedef struct Z_Quarter
45 #define Z_Quarter_first 0
46 #define Z_Quarter_second 1
47 #define Z_Quarter_third 2
48 #define Z_Quarter_fourth 3
58 typedef struct Z_Season
61 #define Z_Season_winter 0
62 #define Z_Season_spring 1
63 #define Z_Season_summer 2
64 #define Z_Season_autumn 3
74 typedef struct Z_PartOfYear
77 #define Z_PartOfYear_monthAndDay 0
78 #define Z_PartOfYear_julianDay 1
79 #define Z_PartOfYear_weekNumber 2
80 #define Z_PartOfYear_quarter 3
81 #define Z_PartOfYear_season 4
84 Z_MonthAndDay *monthAndDay;
95 #define Z_Era_decade 0
96 #define Z_Era_century 1
97 #define Z_Era_millennium 2
102 Odr_null *millennium;
106 typedef struct Z_DateFlags
108 Odr_null *circa; /* OPTIONAL */
109 Z_Era *era; /* OPTIONAL */
112 typedef struct Z_Date
115 Z_PartOfYear *partOfYear; /* OPTIONAL */
116 Z_DateFlags *flags; /* OPTIONAL */
119 typedef struct Z_Zone
122 #define Z_Zone_local 0
124 #define Z_Zone_utcOffset 2
133 typedef struct Z_Time
136 int *minute; /* OPTIONAL */
137 int *second; /* OPTIONAL */
138 Z_IntUnit *partOfSecond; /* OPTIONAL */
139 Z_Zone *zone; /* OPTIONAL */
142 typedef struct Z_DateTime
144 Z_Date *z3950Date; /* OPTIONAL */
145 Z_Time *z3950Time; /* OPTIONAL */
148 YAZ_EXPORT int z_DateTime(ODR o, Z_DateTime **p, int opt, const char *name);