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.2 1999-04-20 09:56:48 adam
12 * Added 'name' paramter to encoder/decoder routines (typedef Odr_fun).
13 * Modified all encoders/decoders to reflect this change.
15 * Revision 1.1 1998/02/10 15:31:52 adam
16 * Implemented date and time structure. Changed the Update Extended
30 typedef struct Z_MonthAndDay
33 int *day; /* OPTIONAL */
36 typedef struct Z_Quarter
39 #define Z_Quarter_first 0
40 #define Z_Quarter_second 1
41 #define Z_Quarter_third 2
42 #define Z_Quarter_fourth 3
52 typedef struct Z_Season
55 #define Z_Season_winter 0
56 #define Z_Season_spring 1
57 #define Z_Season_summer 2
58 #define Z_Season_autumn 3
68 typedef struct Z_PartOfYear
71 #define Z_PartOfYear_monthAndDay 0
72 #define Z_PartOfYear_julianDay 1
73 #define Z_PartOfYear_weekNumber 2
74 #define Z_PartOfYear_quarter 3
75 #define Z_PartOfYear_season 4
78 Z_MonthAndDay *monthAndDay;
89 #define Z_Era_decade 0
90 #define Z_Era_century 1
91 #define Z_Era_millennium 2
100 typedef struct Z_DateFlags
102 Odr_null *circa; /* OPTIONAL */
103 Z_Era *era; /* OPTIONAL */
106 typedef struct Z_Date
109 Z_PartOfYear *partOfYear; /* OPTIONAL */
110 Z_DateFlags *flags; /* OPTIONAL */
113 typedef struct Z_Zone
116 #define Z_Zone_local 0
118 #define Z_Zone_utcOffset 2
127 typedef struct Z_Time
130 int *minute; /* OPTIONAL */
131 int *second; /* OPTIONAL */
132 Z_IntUnit *partOfSecond; /* OPTIONAL */
133 Z_Zone *zone; /* OPTIONAL */
136 typedef struct Z_DateTime
138 Z_Date *z3950Date; /* OPTIONAL */
139 Z_Time *z3950Time; /* OPTIONAL */
142 YAZ_EXPORT int z_DateTime(ODR o, Z_DateTime **p, int opt, const char *name);