Fix cannot build YAZ on jessie : libgnutls-dev is gone YAZ-797
[yaz-moved-to-github.git] / src / datetime.asn
1 UserInfoFormat-dateTime
2 {Z39-50-userInfoFormat dateTime (6)} DEFINITIONS ::=
3 BEGIN
4 IMPORTS IntUnit FROM Z39-50-APDU-1995;
5
6 DateTime ::= SEQUENCE{
7      date [1]  Z3950Date OPTIONAL,
8      time [2]  Z3950Time OPTIONAL
9                     -- one or the other, or both
10           }
11
12 Z3950Date ::= SEQUENCE{
13  year         [1] IMPLICIT INTEGER,
14                     -- For "positive" years, i.e. 1 AD or later, supply
15                     -- the absolute year, e.g. If the year is 1995, supply
16                     -- the integer 1995; the value 95 would indicate the
17                     -- year 0095.
18                     -- For "negative" years, e.g. 1 BC or earlier, -1
19                     -- represents 1 BC, -2 represents 2 BC, etc. Zero is
20                     -- invalid, because there was no year zero.
21  partOfYear   [2] CHOICE{ -- may be omitted if only year is significant
22         monthAndDay [1]   IMPLICIT SEQUENCE{
23                        month [2]  IMPLICIT INTEGER, 
24                                    -- value 1-12
25                        day   [3]  IMPLICIT INTEGER OPTIONAL
26                                    -- may be omitted if only year and month
27                                    -- are significant. Value 1-31.
28                                            },
29         julianDay   [2]   IMPLICIT INTEGER, -- Value 1 - 366.
30         weekNumber  [3]   IMPLICIT INTEGER, -- Value 1 - 53. 
31         quarter     [4] CHOICE{
32                        first    [1] IMPLICIT NULL,
33                        second   [2] IMPLICIT NULL,
34                        third    [3] IMPLICIT NULL,
35                        fourth   [4] IMPLICIT NULL},
36         season      [5] CHOICE{
37                        winter   [1] IMPLICIT NULL,
38                        spring   [2] IMPLICIT NULL,
39                        summer   [3] IMPLICIT NULL,
40                        autumn   [4] IMPLICIT NULL}
41                                               } OPTIONAL, 
42  flags        [3] IMPLICIT SEQUENCE{
43      circa          [1]   IMPLICIT NULL OPTIONAL,
44                           -- if this flag is set then the date is "approximate".
45      era            [2]   CHOICE{
46                           -- If era occurs, partOfYear should not occur.
47                           decade         [1] IMPLICIT NULL,
48                                               -- year must be multiple of 10.
49                                               -- For example, 1900 refers to
50                                               -- the decade covering the years
51                                               -- 1900 through 1909.
52                           century        [2] IMPLICIT NULL,
53                                               -- year must be multiple of 100.
54                           millennium     [3] IMPLICIT NULL
55                                               -- year must be multiple of 1000.
56                                                     } OPTIONAL
57                                               } OPTIONAL
58                                 }
59
60
61 Z3950Time ::= SEQUENCE{
62      hour           [1] IMPLICIT INTEGER,
63                              -- Value 0-23. 
64      minute         [2]  IMPLICIT INTEGER OPTIONAL,
65                              -- value 0-59. May be omitted when hour only is
66                              -- significant (in which case second and
67                              -- partOfSecond must also be omitted). 
68      second         [3]  IMPLICIT INTEGER OPTIONAL,
69                              -- value 0-59. May be omitted when only hour, or
70                              -- hour and minute, is significant (in which case
71                              -- partOfSecond must also be omitted).
72      partOfSecond   [4]  IMPLICIT IntUnit OPTIONAL,
73                              -- Use Unit System = 'si', Unit type = 'time'; 
74                              -- Unit = 'second', with appropriate value and
75                              -- scale factor.
76      zone           [5]  CHOICE{
77                               local      [1]  IMPLICIT NULL,
78                               utc        [2]  IMPLICIT NULL,
79                               utcOffset  [3]  IMPLICIT INTEGER  -- in minutes
80                                                     }}             
81 END