1// Copyright (C) 2016 and later: Unicode, Inc. and others. 2// License & terms of use: http://www.unicode.org/copyright.html 3// Copyright (c) 2008-2013 International Business Machines 4// Corporation and others. All Rights Reserved. 5calendar:table(nofallback) { 6 Info { 7 Description { "These are the data driven calendar tests" } 8 LongDescription { "Data for data driven calendar tests." } 9 } 10 TestData { 11 TestCalendarConversion { 12 Headers { "locale","from","to" } 13 Info { 14 Description { "Test data for calendar conversion :" } 15 } 16 Settings { 17 { 18 ToCalendar { "en_US@calendar=gregorian" } 19 Type { "convert_fwd" } 20 }, 21 { 22 ToCalendar { "en_US@calendar=gregorian" } 23 Type { "convert_rev" } 24 }, 25 } 26 Cases { 27 // taiwanese calendar 28 // "0/1/1912/june/4 == gregorian year=1912, ERA=AD, same month, same day 29 { 30 "en_US@calendar=roc", 31 "ERA=1,YEAR=1,MONTH=JUNE,DATE=4", // tw 32 "ERA=1,YEAR=1912,MONTH=,DATE=" // greg 33 }, 34 { 35 "en_US@calendar=roc", 36 "ERA=1,YEAR=3,MONTH=FEBRUARY,DATE=12", // tw 37 "ERA=1,YEAR=1914,MONTH=,DATE=" // greg 38 }, 39 { 40 "en_US@calendar=roc", 41 "ERA=1,YEAR=96,MONTH=FEBRUARY,DATE=12", // tw 42 "ERA=1,YEAR=2007,MONTH=,DATE=" // greg 43 }, 44 // before 1912: 45 // [before minguo]2 1[month] 24[day] -> 1910-1-24 46 { 47 "en_US@calendar=roc", 48 "ERA=0,YEAR=2,MONTH=JANUARY,DATE=24", // tw 49 "ERA=1,YEAR=1910,MONTH=JANUARY,DATE=24", // greg 50 }, 51 52 // chinese calendar 53 // (0-based months) 54 { 55 "en_US@calendar=chinese", 56 "EXTENDED_YEAR=4601,MONTH=6,DATE=28,IS_LEAP_MONTH=0", // ch 57 "YEAR=1964,MONTH=8,DATE=4", // greg 58 }, 59 { 60 "en_US@calendar=chinese", 61 "EXTENDED_YEAR=4601,MONTH=6,DATE=29,IS_LEAP_MONTH=0", // ch 62 "YEAR=1964,MONTH=8,DATE=5", // greg 63 }, 64 { 65 "en_US@calendar=chinese", 66 "EXTENDED_YEAR=4601,MONTH=7,DATE=1,IS_LEAP_MONTH=0", // ch 67 "YEAR=1964,MONTH=8,DATE=6", // greg 68 }, 69 { 70 "en_US@calendar=chinese", 71 "EXTENDED_YEAR=4601,MONTH=7,DATE=2,IS_LEAP_MONTH=0", // ch 72 "YEAR=1964,MONTH=8,DATE=7", // greg 73 }, 74 { 75 "en_US@calendar=chinese", 76 "EXTENDED_YEAR=4598,MONTH=10,DATE=18,IS_LEAP_MONTH=0", // ch 77 "YEAR=1961,MONTH=11,DATE=25", // greg 78 }, 79 { 80 "en_US@calendar=chinese", 81 "EXTENDED_YEAR=4636,MONTH=3,DATE=21,IS_LEAP_MONTH=0", // ch 82 "YEAR=1999,MONTH=5,DATE=4", // greg 83 }, 84 85 { 86 "en_US@calendar=chinese", 87 "EXTENDED_YEAR=4627,MONTH=3,DATE=29,IS_LEAP_MONTH=0", // ch 88 "YEAR=1990,MONTH=4,DATE=23", // greg 89 }, 90 { 91 "en_US@calendar=chinese", 92 "EXTENDED_YEAR=4627,MONTH=4,DATE=1,IS_LEAP_MONTH=0", // ch 93 "YEAR=1990,MONTH=4,DATE=24", // greg 94 }, 95 { 96 "en_US@calendar=chinese", 97 "EXTENDED_YEAR=4627,MONTH=4,DATE=30,IS_LEAP_MONTH=0", // ch 98 "YEAR=1990,MONTH=5,DATE=22", // greg 99 }, 100 { 101 "en_US@calendar=chinese", 102 "EXTENDED_YEAR=4627,MONTH=4,DATE=1,IS_LEAP_MONTH=1", // ch 103 "YEAR=1990,MONTH=5,DATE=23", // greg 104 }, 105 { 106 "en_US@calendar=chinese", 107 "EXTENDED_YEAR=4627,MONTH=4,DATE=28,IS_LEAP_MONTH=1", // ch 108 "YEAR=1990,MONTH=6,DATE=20", // greg 109 }, 110 { 111 "en_US@calendar=chinese", 112 "EXTENDED_YEAR=4627,MONTH=4,DATE=29,IS_LEAP_MONTH=1", // ch 113 "YEAR=1990,MONTH=6,DATE=21", // greg 114 }, 115 { 116 "en_US@calendar=chinese", 117 "EXTENDED_YEAR=4627,MONTH=5,DATE=1,IS_LEAP_MONTH=0", // ch 118 "YEAR=1990,MONTH=6,DATE=22", // greg 119 }, 120 // dangi calendar 121 // (0-based months) 122 { 123 "en_US@calendar=dangi", 124 "EXTENDED_YEAR=4297,MONTH=6,DATE=29,IS_LEAP_MONTH=0", // dangi 125 "YEAR=1964,MONTH=8,DATE=5", // greg 126 }, 127 { 128 "en_US@calendar=dangi", 129 "EXTENDED_YEAR=4297,MONTH=7,DATE=1,IS_LEAP_MONTH=0", // dangi 130 "YEAR=1964,MONTH=8,DATE=6", // greg 131 }, 132 { 133 "en_US@calendar=dangi", 134 "EXTENDED_YEAR=4294,MONTH=10,DATE=18,IS_LEAP_MONTH=0", // dangi 135 "YEAR=1961,MONTH=11,DATE=25", // greg 136 }, 137 { 138 "en_US@calendar=dangi", 139 "EXTENDED_YEAR=4323,MONTH=4,DATE=30,IS_LEAP_MONTH=0", // dangi 140 "YEAR=1990,MONTH=5,DATE=22", // greg 141 }, 142 { 143 "en_US@calendar=dangi", 144 "EXTENDED_YEAR=4323,MONTH=4,DATE=1,IS_LEAP_MONTH=1", // dangi 145 "YEAR=1990,MONTH=5,DATE=23", // greg 146 }, 147 { 148 "en_US@calendar=dangi", 149 "EXTENDED_YEAR=4323,MONTH=4,DATE=29,IS_LEAP_MONTH=1", // dangi 150 "YEAR=1990,MONTH=6,DATE=21", // greg 151 }, 152 { 153 "en_US@calendar=dangi", 154 "EXTENDED_YEAR=4323,MONTH=5,DATE=1,IS_LEAP_MONTH=0", // dangi 155 "YEAR=1990,MONTH=6,DATE=22", // greg 156 }, 157 { 158 "en_US@calendar=dangi", 159 "EXTENDED_YEAR=4213,MONTH=9,DATE=1,IS_LEAP_MONTH=0", // dangi 160 "YEAR=1880,MONTH=10,DATE=3", // greg 161 }, 162 { 163 "en_US@calendar=dangi", 164 "EXTENDED_YEAR=4215,MONTH=10,DATE=1,IS_LEAP_MONTH=0", // dangi 165 "YEAR=1882,MONTH=11,DATE=10", // greg 166 }, 167 { 168 "en_US@calendar=dangi", 169 "EXTENDED_YEAR=4230,MONTH=6,DATE=1,IS_LEAP_MONTH=0", // dangi 170 "YEAR=1897,MONTH=6,DATE=29", // greg 171 }, 172 } 173 } 174 TestCalendarOperations { 175 Headers { "locale","from","operation","params","to" } 176 Info { 177 Description { "Test data for calendar operation :" } 178 } 179 Settings { 180 { 181 Type { "ops" } 182 }, 183 } 184 Cases { 185 //roc 186 { 187 "en_US@calendar=roc", 188 "ERA=1,YEAR=1,MONTH=JUNE,DATE=4", // tw 189 "roll", 190 "DATE=1", // date + 1 191 "ERA=1,YEAR=1,MONTH=JUNE,DATE=5", // tw 192 }, 193 { 194 "en_US@calendar=roc", 195 "ERA=1,YEAR=1,MONTH=JUNE,DATE=4", // tw 196 "add", 197 "DATE=1", // date + 1 198 "ERA=1,YEAR=1,MONTH=JUNE,DATE=5", // tw 199 }, 200 { 201 "en_US@calendar=roc", 202 "ERA=1,YEAR=1,MONTH=JUNE,DATE=4", // tw 203 "roll", 204 "YEAR=1", // date + 1 205 "ERA=1,YEAR=2,MONTH=JUNE,DATE=4", // tw 206 }, 207 { 208 "en_US@calendar=roc", 209 "ERA=1,YEAR=1,MONTH=JUNE,DATE=4", // tw 210 "add", 211 "YEAR=1", // date + 1 212 "ERA=1,YEAR=2,MONTH=JUNE,DATE=4", // tw 213 }, 214 215 //chinese add tests 216 { // normal 217 "en_US@calendar=chinese", 218 "EXTENDED_YEAR=4642,MONTH=2,DATE=15,IS_LEAP_MONTH=0", // ch 219 "add", 220 "MONTH=3", // month + 3 221 "EXTENDED_YEAR=4642,MONTH=5,DATE=15,IS_LEAP_MONTH=0", // ch 222 }, 223 { // across year 224 "en_US@calendar=chinese", 225 "EXTENDED_YEAR=4639,MONTH=11,DATE=15,IS_LEAP_MONTH=0", // ch 226 "add", 227 "MONTH=1", // month + 1 228 "EXTENDED_YEAR=4640,MONTH=0,DATE=15,IS_LEAP_MONTH=0", // ch 229 }, 230 { // across year 231 "en_US@calendar=chinese", 232 "EXTENDED_YEAR=4640,MONTH=0,DATE=15,IS_LEAP_MONTH=0", // ch 233 "add", 234 "MONTH=-1", // month - 1 235 "EXTENDED_YEAR=4639,MONTH=11,DATE=15,IS_LEAP_MONTH=0", // ch 236 }, 237 { // month=3 is a leap month 238 "en_US@calendar=chinese", 239 "EXTENDED_YEAR=4638,MONTH=2,DATE=15,IS_LEAP_MONTH=0", // ch 240 "add", 241 "MONTH=3", // month + 3 242 "EXTENDED_YEAR=4638,MONTH=4,DATE=15,IS_LEAP_MONTH=0", // ch 243 }, 244 { // month=3 is a leap month 245 "en_US@calendar=chinese", 246 "EXTENDED_YEAR=4638,MONTH=2,DATE=15,IS_LEAP_MONTH=0", // ch 247 "add", 248 "MONTH=2", // month + 2 249 "EXTENDED_YEAR=4638,MONTH=3,DATE=15,IS_LEAP_MONTH=1", // ch 250 }, 251 { // month=3 is a leap month 252 "en_US@calendar=chinese", 253 "EXTENDED_YEAR=4638,MONTH=3,DATE=15,IS_LEAP_MONTH=0", // ch 254 "add", 255 "MONTH=1", // month + 1 256 "EXTENDED_YEAR=4638,MONTH=3,DATE=15,IS_LEAP_MONTH=1", // ch 257 }, 258 { // month=3 is a leap month 259 "en_US@calendar=chinese", 260 "EXTENDED_YEAR=4638,MONTH=3,DATE=15,IS_LEAP_MONTH=1", // ch 261 "add", 262 "MONTH=1", // month + 1 263 "EXTENDED_YEAR=4638,MONTH=4,DATE=15,IS_LEAP_MONTH=0", // ch 264 }, 265 { // dom should pin 266 "en_US@calendar=chinese", 267 "EXTENDED_YEAR=4638,MONTH=3,DATE=30,IS_LEAP_MONTH=0", // ch 268 "add", 269 "MONTH=1", // month + 1 270 "EXTENDED_YEAR=4638,MONTH=3,DATE=29,IS_LEAP_MONTH=1", // ch 271 }, 272 { // dom should pin 273 "en_US@calendar=chinese", 274 "EXTENDED_YEAR=4638,MONTH=3,DATE=30,IS_LEAP_MONTH=0", // ch 275 "add", 276 "MONTH=2", // month + 2 277 "EXTENDED_YEAR=4638,MONTH=4,DATE=30,IS_LEAP_MONTH=0", // ch 278 }, 279 { // dom should pin 280 "en_US@calendar=chinese", 281 "EXTENDED_YEAR=4638,MONTH=3,DATE=30,IS_LEAP_MONTH=0", // ch 282 "add", 283 "MONTH=3", // month + 3 284 "EXTENDED_YEAR=4638,MONTH=5,DATE=29,IS_LEAP_MONTH=0", // ch 285 }, 286 287 // chinese roll tests 288 { // normal 289 "en_US@calendar=chinese", 290 "EXTENDED_YEAR=4642,MONTH=2,DATE=15,IS_LEAP_MONTH=0", // ch 291 "roll", 292 "MONTH=3", // month + 3 293 "EXTENDED_YEAR=4642,MONTH=5,DATE=15,IS_LEAP_MONTH=0", // ch 294 }, 295 { // normal 296 "en_US@calendar=chinese", 297 "EXTENDED_YEAR=4642,MONTH=2,DATE=15,IS_LEAP_MONTH=0", // ch 298 "roll", 299 "MONTH=11", // month + 11 300 "EXTENDED_YEAR=4642,MONTH=1,DATE=15,IS_LEAP_MONTH=0", // ch 301 }, 302 { // across year 303 "en_US@calendar=chinese", 304 "EXTENDED_YEAR=4639,MONTH=11,DATE=15,IS_LEAP_MONTH=0", // ch 305 "roll", 306 "MONTH=1", // month + 1 307 "EXTENDED_YEAR=4639,MONTH=0,DATE=15,IS_LEAP_MONTH=0", // ch 308 }, 309 { // across year 310 "en_US@calendar=chinese", 311 "EXTENDED_YEAR=4640,MONTH=0,DATE=15,IS_LEAP_MONTH=0", // ch 312 "roll", 313 "MONTH=-1", // month - 1 314 "EXTENDED_YEAR=4640,MONTH=11,DATE=15,IS_LEAP_MONTH=0", // ch 315 }, 316 { // month=3 is a leap month 317 "en_US@calendar=chinese", 318 "EXTENDED_YEAR=4638,MONTH=2,DATE=15,IS_LEAP_MONTH=0", // ch 319 "roll", 320 "MONTH=3", // month + 3 321 "EXTENDED_YEAR=4638,MONTH=4,DATE=15,IS_LEAP_MONTH=0", // ch 322 }, 323 { // month=3 is a leap month 324 "en_US@calendar=chinese", 325 "EXTENDED_YEAR=4638,MONTH=2,DATE=15,IS_LEAP_MONTH=0", // ch 326 "roll", 327 "MONTH=16", // month + 16 328 "EXTENDED_YEAR=4638,MONTH=4,DATE=15,IS_LEAP_MONTH=0", // ch 329 }, 330 { // month=3 is a leap month 331 "en_US@calendar=chinese", 332 "EXTENDED_YEAR=4638,MONTH=2,DATE=15,IS_LEAP_MONTH=0", // ch 333 "roll", 334 "MONTH=2", // month + 2 335 "EXTENDED_YEAR=4638,MONTH=3,DATE=15,IS_LEAP_MONTH=1", // ch 336 }, 337 { // month=3 is a leap month 338 "en_US@calendar=chinese", 339 "EXTENDED_YEAR=4638,MONTH=2,DATE=15,IS_LEAP_MONTH=0", // ch 340 "roll", 341 "MONTH=28", // month + 28 342 "EXTENDED_YEAR=4638,MONTH=3,DATE=15,IS_LEAP_MONTH=1", // ch 343 }, 344 { // month=3 is a leap month 345 "en_US@calendar=chinese", 346 "EXTENDED_YEAR=4638,MONTH=3,DATE=15,IS_LEAP_MONTH=0", // ch 347 "roll", 348 "MONTH=1", // month + 1 349 "EXTENDED_YEAR=4638,MONTH=3,DATE=15,IS_LEAP_MONTH=1", // ch 350 }, 351 { // month=3 is a leap month 352 "en_US@calendar=chinese", 353 "EXTENDED_YEAR=4638,MONTH=3,DATE=15,IS_LEAP_MONTH=0", // ch 354 "roll", 355 "MONTH=-12", // month - 12 356 "EXTENDED_YEAR=4638,MONTH=3,DATE=15,IS_LEAP_MONTH=1", // ch 357 }, 358 { // month=3 is a leap month 359 "en_US@calendar=chinese", 360 "EXTENDED_YEAR=4638,MONTH=3,DATE=15,IS_LEAP_MONTH=1", // ch 361 "roll", 362 "MONTH=1", // month + 1 363 "EXTENDED_YEAR=4638,MONTH=4,DATE=15,IS_LEAP_MONTH=0", // ch 364 }, 365 { // month=3 is a leap month 366 "en_US@calendar=chinese", 367 "EXTENDED_YEAR=4638,MONTH=3,DATE=15,IS_LEAP_MONTH=1", // ch 368 "roll", 369 "MONTH=-25", // month - 25 370 "EXTENDED_YEAR=4638,MONTH=4,DATE=15,IS_LEAP_MONTH=0", // ch 371 }, 372 { // dom should pin 373 "en_US@calendar=chinese", 374 "EXTENDED_YEAR=4638,MONTH=3,DATE=30,IS_LEAP_MONTH=0", // ch 375 "roll", 376 "MONTH=1", // month + 1 377 "EXTENDED_YEAR=4638,MONTH=3,DATE=29,IS_LEAP_MONTH=1", // ch 378 }, 379 { // dom should pin 380 "en_US@calendar=chinese", 381 "EXTENDED_YEAR=4638,MONTH=3,DATE=30,IS_LEAP_MONTH=0", // ch 382 "roll", 383 "MONTH=14", // month + 14 384 "EXTENDED_YEAR=4638,MONTH=3,DATE=29,IS_LEAP_MONTH=1", // ch 385 }, 386 { // no dom pin 387 "en_US@calendar=chinese", 388 "EXTENDED_YEAR=4638,MONTH=3,DATE=30,IS_LEAP_MONTH=0", // ch 389 "roll", 390 "MONTH=15", // month + 15 391 "EXTENDED_YEAR=4638,MONTH=4,DATE=30,IS_LEAP_MONTH=0", // ch 392 }, 393 { // dom should pin 394 "en_US@calendar=chinese", 395 "EXTENDED_YEAR=4638,MONTH=3,DATE=30,IS_LEAP_MONTH=0", // ch 396 "roll", 397 "MONTH=-10", // month - 10 398 "EXTENDED_YEAR=4638,MONTH=5,DATE=29,IS_LEAP_MONTH=0", // ch 399 }, 400 //dangi add tests 401 { // normal 402 "en_US@calendar=dangi", 403 "EXTENDED_YEAR=4338,MONTH=2,DATE=15,IS_LEAP_MONTH=0", // dangi 404 "add", 405 "MONTH=3", // month + 3 406 "EXTENDED_YEAR=4338,MONTH=5,DATE=15,IS_LEAP_MONTH=0", // dangi 407 }, 408 { // across year 409 "en_US@calendar=dangi", 410 "EXTENDED_YEAR=4335,MONTH=11,DATE=15,IS_LEAP_MONTH=0", // dangi 411 "add", 412 "MONTH=1", // month + 1 413 "EXTENDED_YEAR=4336,MONTH=0,DATE=15,IS_LEAP_MONTH=0", // dangi 414 }, 415 { // 4 = leap 416 "en_US@calendar=dangi", 417 "EXTENDED_YEAR=4334,MONTH=2,DATE=15,IS_LEAP_MONTH=0", // dangi 418 "add", 419 "MONTH=3", // month + 3 420 "EXTENDED_YEAR=4334,MONTH=4,DATE=15,IS_LEAP_MONTH=0", // dangi 421 }, 422 { // 4 = leap 423 "en_US@calendar=dangi", 424 "EXTENDED_YEAR=4334,MONTH=2,DATE=15,IS_LEAP_MONTH=0", // dangi 425 "add", 426 "MONTH=2", // month + 2 427 "EXTENDED_YEAR=4334,MONTH=3,DATE=15,IS_LEAP_MONTH=1", // dangi 428 }, 429 { // dom should pin 430 "en_US@calendar=dangi", 431 "EXTENDED_YEAR=4334,MONTH=2,DATE=30,IS_LEAP_MONTH=0", // dangi 432 "add", 433 "MONTH=2", // month + 2 434 "EXTENDED_YEAR=4334,MONTH=3,DATE=29,IS_LEAP_MONTH=1", // dangi 435 }, 436 { 437 "en_US@calendar=hebrew", 438 "MILLIS=-180799750799999", 439 "add", 440 "YEAR=100000", // year + 100000 441 "MILLIS=2974932601622001", 442 }, 443 } 444 } 445 } 446} 447