1 // Copyright (c) 2007-2008 International Business Machines
2 // Corporation and others. All Rights Reserved.
3 format:table(nofallback) {
5 Description { "These are the data driven format tests" }
6 LongDescription { "Data for data driven format tests." }
11 Description { "Test data for format and parse :" }
14 // options: 'format', or 'parse'. One can be omitted if this is a 1 way test.
16 Type { "date_format" }
22 Headers { "locale","spec", "date", "str"}
23 // locale: locale including calendar type
24 // spec: either 'PATTERN=y mm h' etc, or 'DATE=SHORT,TIME=LONG'
25 // date: either 'MILLIS=####' where #### is millis,
26 // or a calendar spec ERA=0,YEAR=1, etc.. applied to the calendar type specified by the locale
27 // or RELATIVE_MILLIS=### where ### is a signed value which is added to the current millis
28 // or RELATIVE_ADD:DATE=1 which means that the field "DATE" will be added by +1 relative to current time
29 // str: the expected unicode string
32 "en_US@calendar=gregorian",
33 "DATE=SHORT,TIME=SHORT",
34 "ERA=1,YEAR=2007,MONTH=AUGUST,DATE=8,HOUR_OF_DAY=18,MINUTE=54,SECOND=0",
40 "ERA=1,YEAR=98,MONTH=0,DATE=24",
44 //民國前2年1月24日 -> 1910-1-24
47 "ERA=0,YEAR=2,MONTH=0,DATE=24",
54 Description { "relative format :" }
58 Type { "date_format" }
61 Headers { "locale","spec", "date", "str"}
64 "en_US@calendar=gregorian",
65 "DATE=RELATIVE_SHORT",
66 "RELATIVE_ADD:DATE=1", // one day from now
70 "en_US@calendar=gregorian",
71 "DATE=RELATIVE_SHORT",
72 "RELATIVE_MILLIS=0", // today
76 "en_US@calendar=gregorian",
77 "DATE=RELATIVE_SHORT",
78 "RELATIVE_ADD:DATE=-1", // one day before now
82 "mt_MT@calendar=gregorian",
83 "DATE=RELATIVE_SHORT",
84 "RELATIVE_ADD:DATE=1", // one day from now
88 "mt_MT@calendar=gregorian",
89 "DATE=RELATIVE_SHORT",
90 "RELATIVE_MILLIS=0", // today
94 "mt_MT@calendar=gregorian",
95 "DATE=RELATIVE_SHORT",
96 "RELATIVE_ADD:DATE=-1", // one day before now
101 "DATE=RELATIVE_SHORT",
102 "RELATIVE_ADD:DATE=-2", // 2 days ago
109 Description { "Test data for multiple year lengths, y yy yyy yyyy yyyyy:" }
112 // options: 'format', or 'parse'. One can be omitted if this is a 1 way test.
114 Type { "date_format" }
116 // These are not round trippable, so do not parse.
118 // Type { "date_parse" }
121 Headers { "locale","spec", "date", "str"}
122 // locale: locale including calendar type
123 // spec: either 'PATTERN=y mm h' etc, or 'DATE=SHORT,TIME=LONG'
124 // date: either 'MILLIS=####' where #### is millis,
125 // or a calendar spec ERA=0,YEAR=1, etc.. applied to the calendar type specified by the locale
126 // or RELATIVE_MILLIS=### where ### is a signed value which is added to the current millis
127 // or RELATIVE_ADD:DATE=1 which means that the field "DATE" will be added by +1 relative to current time
128 // str: the expected unicode string
131 //Year y yy yyy yyyy yyyyy
134 //AD 1 1 01 001 0001 00001
136 "en_US@calendar=gregorian",
142 "en_US@calendar=gregorian",
148 "en_US@calendar=gregorian",
154 "en_US@calendar=gregorian",
160 "en_US@calendar=gregorian",
165 //AD 12 12 12 012 0012 00012
167 "en_US@calendar=gregorian",
173 "en_US@calendar=gregorian",
179 "en_US@calendar=gregorian",
185 "en_US@calendar=gregorian",
191 "en_US@calendar=gregorian",
196 //AD 123 123 23 123 0123 00123
198 "en_US@calendar=gregorian",
204 "en_US@calendar=gregorian",
210 "en_US@calendar=gregorian",
216 "en_US@calendar=gregorian",
222 "en_US@calendar=gregorian",
227 //AD 1234 1234 34 1234 1234 01234
229 "en_US@calendar=gregorian",
235 "en_US@calendar=gregorian",
241 "en_US@calendar=gregorian",
247 "en_US@calendar=gregorian",
253 "en_US@calendar=gregorian",
258 //AD 12345 12345 45 12345 12345 12345
260 "en_US@calendar=gregorian",
266 "en_US@calendar=gregorian",
272 "en_US@calendar=gregorian",
278 "en_US@calendar=gregorian",
284 "en_US@calendar=gregorian",
291 TestConsistentPivot {
293 Description { "Test consistent pivot (parse/format) for multiple year lengths, y yy yyy yyyy yyyyy:" }
296 // options: 'format', or 'parse'. One can be omitted if this is a 1 way test.
298 Type { "date_format" }
301 Type { "date_parse" }
304 Headers { "locale","spec", "date", "str"}
305 // locale: locale including calendar type
306 // spec: either 'PATTERN=y mm h' etc, or 'DATE=SHORT,TIME=LONG'
307 // date: either 'MILLIS=####' where #### is millis,
308 // or a calendar spec ERA=0,YEAR=1, etc.. applied to the calendar type specified by the locale
309 // or RELATIVE_MILLIS=### where ### is a signed value which is added to the current millis
310 // or RELATIVE_ADD:DATE=1 which means that the field "DATE" will be added by +1 relative to current time
311 // str: the expected unicode string
314 //Year y yy yyy yyyy yyyyy
317 //AD 1 1 01 001 0001 00001
319 "en_US@calendar=gregorian",
325 "en_US@calendar=gregorian",
331 "en_US@calendar=gregorian",
337 "en_US@calendar=gregorian",
343 "en_US@calendar=gregorian",
351 "en_US@calendar=japanese",
357 "en_US@calendar=japanese",
363 "en_US@calendar=japanese",
369 "en_US@calendar=japanese",
375 "en_US@calendar=japanese",