aboutsummaryrefslogtreecommitdiffhomepage
path: root/specification/src/Text/Edifact/D01B/Simples/S2379.hs
blob: 34e9e54ca958619dcb5caab91c01f758c95edd54 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
{-# LANGUAGE OverloadedStrings #-}

---- Machine generated code.
---- Output of edi-parser-scaffolder

module Text.Edifact.D01B.Simples.S2379
  ( simple2379
  ) where

import           Text.Edifact.Parsing
import           Text.Edifact.Types   (Value)

-- | Derived from this specification:
--
-- >      2379  Date or time or period format code                      [C]
-- >
-- >      Desc: Code specifying the representation of a date, time or
-- >            period.
-- >
-- >      Repr: an..3
-- >
-- >      2     DDMMYY
-- >               Calendar date: D = Day; M = Month; Y = Year.
-- >
-- >      3     MMDDYY
-- >               Calendar date: M = Month; D = Day; Y = Year.
-- >
-- >      4     DDMMCCYY
-- >               Calendar date C=Century; Y=Year; M=Month; D=Day.
-- >
-- >      5     DDMMCCYYHHMM
-- >               Calendar date and time: C=Century; Y=Year; M=Month;
-- >               D=Day; H=Hour; M=Minute.
-- >
-- >      101   YYMMDD
-- >               Calendar date: Y = Year; M = Month; D = Day.
-- >
-- >      102   CCYYMMDD
-- >               Calendar date: C = Century ; Y = Year ; M = Month ; D =
-- >               Day.
-- >
-- >      103   YYWWD
-- >               Calendar week day: Y = Year ; W = Week ; D = Day Week
-- >               number 01 is always first week of January Day number 1
-- >               is always Monday.
-- >
-- >      105   YYDDD
-- >               Calendar day: Y = Year ; D = Day January the first = Day
-- >               001 Always start numbering the days of the year from
-- >               January 1st through December 31st.
-- >
-- >      106   MMDD
-- >               Day of a month: M = Month; D = Day.
-- >
-- >      107   DDD
-- >               Day's number within a specific year: D = Day.
-- >
-- >      108   WW
-- >               Week's number within a specific year: W = Week.
-- >
-- >      109   MM
-- >               Month's number within a specific year: M = Month.
-- >
-- >      110   DD
-- >               Day's number within is a specific month: D = Day.
-- >
-- >      201   YYMMDDHHMM
-- >               Calendar date including time without seconds: Y = Year;
-- >               M = Month; D = Day; H = Hour; M = Minute.
-- >
-- >      202   YYMMDDHHMMSS
-- >               Calendar date including time with seconds: Y = Year; M =
-- >               Month; D = Day; H = Hour; m = Minutes = Seconds.
-- >
-- >      203   CCYYMMDDHHMM
-- >               Calendar date including time with minutes: C=Century;
-- >               Y=Year; M=Month; D=Day; H=Hour; M=Minutes.
-- >
-- >      204   CCYYMMDDHHMMSS
-- >               Calendar date including time with seconds:
-- >               C=Century;Y=Year;
-- >               M=Month;D=Day;H=Hour;M=Minute;S=Second.
-- >
-- >      205   CCYYMMDDHHMMZHHMM
-- >               Calendar date including time and time zone expressed in
-- >               hours and minutes.
-- >               ZHHMM = time zone given as offset from Coordinated
-- >               Universal Time (UTC).
-- >
-- >      301   YYMMDDHHMMZZZ
-- >               See 201 + Z = Time zone.
-- >
-- >      302   YYMMDDHHMMSSZZZ
-- >               See 202 + Z = Time zone.
-- >
-- >      303   CCYYMMDDHHMMZZZ
-- >               See 203 plus Z=Time zone.
-- >
-- >      304   CCYYMMDDHHMMSSZZZ
-- >               See 204 plus Z=Time zone.
-- >
-- >      305   MMDDHHMM
-- >               Month, day, hours, minutes; M = Month; D = Day; H =
-- >               Hour; M = Minute.
-- >
-- >      306   DDHHMM
-- >               Day, hours, minutes; D = Day; H = Hour; M = Minute.
-- >
-- >      401   HHMM
-- >               Time without seconds: H = Hour; m = Minute.
-- >
-- >      402   HHMMSS
-- >               Time with seconds: H = Hour; m = Minute; s = Seconds.
-- >
-- >      404   HHMMSSZZZ
-- >               See 402 plus Z=Time zone.
-- >
-- >      405   MMMMSS
-- >               Time without hours: m=minutes, s=seconds.
-- >
-- >      406   ZHHMM
-- >               Offset from Coordinated Universal Time (UTC) where Z is
-- >               plus (+) or minus (-).
-- >
-- >      501   HHMMHHMM
-- >               Time span without seconds: H = Hour; m = Minute;.
-- >
-- >      502   HHMMSS-HHMMSS
-- >               Format of period to be given without hyphen.
-- >
-- >      503   HHMMSSZZZ-HHMMSSZZZ
-- >               Format of period to be given without hyphen.
-- >
-- >      600   CC
-- >               Century.
-- >
-- >      601   YY
-- >               Calendar year: Y = Year.
-- >
-- >      602   CCYY
-- >               Calendar year including century: C = Century; Y = Year.
-- >
-- >      603   YYS
-- >               Semester in a calendar year: Y = Year; S = Semester.
-- >
-- >      604   CCYYS
-- >               Semester in a calendar year: C = Century; Y = Year; S =
-- >               Semester.
-- >
-- >      608   CCYYQ
-- >               Quarter in a calendar year: C = Century; Y = Year; Q =
-- >               Quarter.
-- >
-- >      609   YYMM
-- >               Month within a calendar year: Y = Year; M = Month.
-- >
-- >      610   CCYYMM
-- >               Month within a calendar year: CC = Century; Y = Year; M
-- >               = Month.
-- >
-- >      613   YYMMA
-- >               Format of period to be given without hyphen (A = ten
-- >               days period).
-- >
-- >      614   CCYYMMA
-- >               Format of period to be given without hyphen (A = ten
-- >               days period).
-- >
-- >      615   YYWW
-- >               Week within a calendar year: Y = Year; W = Week 1st week
-- >               of January = week 01.
-- >
-- >      616   CCYYWW
-- >               Week within a calendar year: CC = Century; Y = Year; W =
-- >               Week (1st week of January = week 01).
-- >
-- >      701   YY-YY
-- >               Format of period to be given in actual message without
-- >               hyphen.
-- >
-- >      702   CCYY-CCYY
-- >               Format of period to be given in actual message without
-- >               hyphen.
-- >
-- >      703   YYS-YYS
-- >               Format of period to be given without hyphen.
-- >
-- >      704   CCYYS-CCYYS
-- >               Format of period to be given in actual message without
-- >               hyphen.
-- >
-- >      705   YYPYYP
-- >               Format of period to be given without hyphen (P = period
-- >               of 4 months).
-- >
-- >      706   CCYYP-CCYYP
-- >               Format of period to be given without hyphen (P = period
-- >               of 4 months).
-- >
-- >      707   YYQ-YYQ
-- >               Format of period to be given without hyphen.
-- >
-- >      708   CCYYQ-CCYYQ
-- >               Format of period to be given in actual message without
-- >               hyphen.
-- >
-- >      709   YYMM-YYMM
-- >               Format of period to be given in actual message without
-- >               hyphen.
-- >
-- >      710   CCYYMM-CCYYMM
-- >               Format of period to be given in actual message without
-- >               hyphen.
-- >
-- > X    711   CCYYMMDD-CCYYMMDD
-- >               Format of period to be given in actual message without
-- >               hyphen.
-- >
-- >            Note:
-- >               1. This code value will be removed effective with
-- >               directory D.03B.
-- >
-- >      713   YYMMDDHHMM-YYMMDDHHMM
-- >               Format of period to be given in actual message without
-- >               hyphen.
-- >
-- >      715   YYWW-YYWW
-- >               Format of period to be given in actual message without
-- >               hyphen.
-- >
-- >      716   CCYYWW-CCYYWW
-- >               Format of period to be given without hyphen.
-- >
-- >      717   YYMMDD-YYMMDD
-- >               Format of period to be given in actual message without
-- >               hyphen.
-- >
-- >      718   CCYYMMDD-CCYYMMDD
-- >               Format of period to be given without hyphen.
-- >
-- >      719   CCYYMMDDHHMM-CCYYMMDDHHMM
-- >               A period of time which includes the century, year,
-- >               month, day, hour and minute. Format of period to be
-- >               given in actual message without hyphen.
-- >
-- >      720   DHHMM-DHHMM
-- >               Format of period to be given without hyphen (D=day of
-- >               the week, 1=Monday; 2=Tuesday; ... 7=Sunday).
-- >
-- >      801   Year
-- >               To indicate a quantity of years.
-- >
-- >      802   Month
-- >               To indicate a quantity of months.
-- >
-- >      803   Week
-- >               To indicate a quantity of weeks.
-- >
-- >      804   Day
-- >               To indicate a quantity of days.
-- >
-- >      805   Hour
-- >               To indicate a quantity of hours.
-- >
-- >      806   Minute
-- >               To indicate a quantity of minutes.
-- >
-- >      807   Second
-- >               To indicate a quantity of seconds.
-- >
-- >      808   Semester
-- >               To indicate a quantity of semesters (six months).
-- >
-- >      809   Four months period
-- >               To indicate a quantity of four months periods.
-- >
-- >      810   Trimester
-- >               To indicate a quantity of trimesters (three months).
-- >
-- >      811   Half month
-- >               To indicate a quantity of half months.
-- >
-- >      812   Ten days
-- >               To indicate a quantity of ten days periods.
-- >
-- >      813   Day of the week
-- >               Numeric representation of the day (Monday = 1).
-- >
-- >      814   Working days
-- >               Number of working days.
simple2379 :: Parser Value
simple2379 = simple "2379" (alphaNumeric `upTo` 3)