// Copyright (c) 2008-2010 International Business Machines
// Corporation and others. All Rights Reserved.
calendar:table(nofallback) {
    Info {
        Description { "These are the data driven calendar tests" }
        LongDescription {   "Data for data driven calendar tests." }
    }
    TestData {
        TestCalendarConversion {
            Headers { "locale","from","to" }
            Info {
                Description { "Test data for calendar conversion :" }
            }
            Settings {
                {
                    ToCalendar { "en_US@calendar=gregorian" }
                    Type { "convert_fwd" }
                },
                {
                    ToCalendar { "en_US@calendar=gregorian" }
                    Type { "convert_rev" }
                },
            }
            Cases { 
               // taiwanese calendar
               // "0/1/1912/june/4 == gregorian year=1912, ERA=AD, same month, same day 
               {
                    "en_US@calendar=roc",         
                    "ERA=1,YEAR=1,MONTH=JUNE,DATE=4",  // tw  
                    "ERA=1,YEAR=1912,MONTH=,DATE="     // greg
               },
               {
                    "en_US@calendar=roc",         
                    "ERA=1,YEAR=3,MONTH=FEBRUARY,DATE=12",  // tw  
                    "ERA=1,YEAR=1914,MONTH=,DATE="     // greg
               },
               {
                    "en_US@calendar=roc",         
                    "ERA=1,YEAR=96,MONTH=FEBRUARY,DATE=12",  // tw  
                    "ERA=1,YEAR=2007,MONTH=,DATE="     // greg
               },
               // before 1912:
               // [before minguo]2   1[month] 24[day] -> 1910-1-24 
               {
                    "en_US@calendar=roc", 
                    "ERA=0,YEAR=2,MONTH=JANUARY,DATE=24", // tw
                    "ERA=1,YEAR=1910,MONTH=JANUARY,DATE=24", // greg
               },
               
               // chinese calendar
               // (0-based months)
               {
                    "en_US@calendar=chinese",
                    "EXTENDED_YEAR=4601,MONTH=6,DATE=28,IS_LEAP_MONTH=0", // ch
                    "YEAR=1964,MONTH=8,DATE=4",   // greg
               },
               {
                    "en_US@calendar=chinese",
                    "EXTENDED_YEAR=4601,MONTH=6,DATE=29,IS_LEAP_MONTH=0", // ch
                    "YEAR=1964,MONTH=8,DATE=5",   // greg
               },
               {
                    "en_US@calendar=chinese",
                    "EXTENDED_YEAR=4601,MONTH=7,DATE=1,IS_LEAP_MONTH=0", // ch
                    "YEAR=1964,MONTH=8,DATE=6",   // greg
               },
               {
                    "en_US@calendar=chinese",
                    "EXTENDED_YEAR=4601,MONTH=7,DATE=2,IS_LEAP_MONTH=0", // ch
                    "YEAR=1964,MONTH=8,DATE=7",   // greg
               },
               {
                    "en_US@calendar=chinese",
                    "EXTENDED_YEAR=4598,MONTH=10,DATE=18,IS_LEAP_MONTH=0", // ch
                    "YEAR=1961,MONTH=11,DATE=25",   // greg
               },
               {
                    "en_US@calendar=chinese",
                    "EXTENDED_YEAR=4636,MONTH=3,DATE=21,IS_LEAP_MONTH=0", // ch
                    "YEAR=1999,MONTH=5,DATE=4",   // greg
               },

               {
                    "en_US@calendar=chinese",
                    "EXTENDED_YEAR=4627,MONTH=3,DATE=29,IS_LEAP_MONTH=0", // ch
                    "YEAR=1990,MONTH=4,DATE=23",   // greg
               },
               {
                    "en_US@calendar=chinese",
                    "EXTENDED_YEAR=4627,MONTH=4,DATE=1,IS_LEAP_MONTH=0", // ch
                    "YEAR=1990,MONTH=4,DATE=24",   // greg
               },
               {
                    "en_US@calendar=chinese",
                    "EXTENDED_YEAR=4627,MONTH=4,DATE=30,IS_LEAP_MONTH=0", // ch
                    "YEAR=1990,MONTH=5,DATE=22",   // greg
               },
               {
                    "en_US@calendar=chinese",
                    "EXTENDED_YEAR=4627,MONTH=4,DATE=1,IS_LEAP_MONTH=1", // ch
                    "YEAR=1990,MONTH=5,DATE=23",   // greg
               },
               {
                    "en_US@calendar=chinese",
                    "EXTENDED_YEAR=4627,MONTH=4,DATE=28,IS_LEAP_MONTH=1", // ch
                    "YEAR=1990,MONTH=6,DATE=20",   // greg
               },
               {
                    "en_US@calendar=chinese",
                    "EXTENDED_YEAR=4627,MONTH=4,DATE=29,IS_LEAP_MONTH=1", // ch
                    "YEAR=1990,MONTH=6,DATE=21",   // greg
               },
               {
                    "en_US@calendar=chinese",
                    "EXTENDED_YEAR=4627,MONTH=5,DATE=1,IS_LEAP_MONTH=0", // ch
                    "YEAR=1990,MONTH=6,DATE=22",   // greg
               },
            }
        }
        TestCalendarOperations {
            Headers { "locale","from","operation","params","to" }
            Info {
                Description { "Test data for calendar operation :" }
            }
            Settings {
                {
                    Type { "ops" }
                },
            }
            Cases {
               //roc
               {
                    "en_US@calendar=roc",         
                    "ERA=1,YEAR=1,MONTH=JUNE,DATE=4",  // tw  
                    "roll",
                    "DATE=1", // date + 1
                    "ERA=1,YEAR=1,MONTH=JUNE,DATE=5",  // tw  
               },
               {
                    "en_US@calendar=roc",         
                    "ERA=1,YEAR=1,MONTH=JUNE,DATE=4",  // tw  
                    "add",
                    "DATE=1", // date + 1
                    "ERA=1,YEAR=1,MONTH=JUNE,DATE=5",  // tw  
               },
               {
                    "en_US@calendar=roc",         
                    "ERA=1,YEAR=1,MONTH=JUNE,DATE=4",  // tw  
                    "roll",
                    "YEAR=1", // date + 1
                    "ERA=1,YEAR=2,MONTH=JUNE,DATE=4",  // tw  
               },
               {
                    "en_US@calendar=roc",         
                    "ERA=1,YEAR=1,MONTH=JUNE,DATE=4",  // tw  
                    "add",
                    "YEAR=1", // date + 1
                    "ERA=1,YEAR=2,MONTH=JUNE,DATE=4",  // tw  
               },
               
               //chinese add tests
               { // normal
                    "en_US@calendar=chinese",         
                    "EXTENDED_YEAR=4642,MONTH=2,DATE=15,IS_LEAP_MONTH=0",  // ch  
                    "add",
                    "MONTH=3", // month + 3
                    "EXTENDED_YEAR=4642,MONTH=5,DATE=15,IS_LEAP_MONTH=0",  // ch  
               },
               { // across year
                    "en_US@calendar=chinese",         
                    "EXTENDED_YEAR=4639,MONTH=11,DATE=15,IS_LEAP_MONTH=0",  // ch  
                    "add",
                    "MONTH=1", // month + 1
                    "EXTENDED_YEAR=4640,MONTH=0,DATE=15,IS_LEAP_MONTH=0",  // ch  
               },
               { // across year
                    "en_US@calendar=chinese",         
                    "EXTENDED_YEAR=4640,MONTH=0,DATE=15,IS_LEAP_MONTH=0",  // ch  
                    "add",
                    "MONTH=-1", // month - 1
                    "EXTENDED_YEAR=4639,MONTH=11,DATE=15,IS_LEAP_MONTH=0",  // ch  
               },
               { // month=3 is a leap month
                    "en_US@calendar=chinese",         
                    "EXTENDED_YEAR=4638,MONTH=2,DATE=15,IS_LEAP_MONTH=0",  // ch  
                    "add",
                    "MONTH=3", // month + 3
                    "EXTENDED_YEAR=4638,MONTH=4,DATE=15,IS_LEAP_MONTH=0",  // ch  
               },
               { // month=3 is a leap month
                    "en_US@calendar=chinese",         
                    "EXTENDED_YEAR=4638,MONTH=2,DATE=15,IS_LEAP_MONTH=0",  // ch  
                    "add",
                    "MONTH=2", // month + 2
                    "EXTENDED_YEAR=4638,MONTH=3,DATE=15,IS_LEAP_MONTH=1",  // ch  
               },
               { // month=3 is a leap month
                    "en_US@calendar=chinese",         
                    "EXTENDED_YEAR=4638,MONTH=3,DATE=15,IS_LEAP_MONTH=0",  // ch  
                    "add",
                    "MONTH=1", // month + 1
                    "EXTENDED_YEAR=4638,MONTH=3,DATE=15,IS_LEAP_MONTH=1",  // ch  
               },
               { // month=3 is a leap month
                    "en_US@calendar=chinese",         
                    "EXTENDED_YEAR=4638,MONTH=3,DATE=15,IS_LEAP_MONTH=1",  // ch  
                    "add",
                    "MONTH=1", // month + 1
                    "EXTENDED_YEAR=4638,MONTH=4,DATE=15,IS_LEAP_MONTH=0",  // ch  
               },
               { // dom should pin
                    "en_US@calendar=chinese",         
                    "EXTENDED_YEAR=4638,MONTH=3,DATE=30,IS_LEAP_MONTH=0",  // ch  
                    "add",
                    "MONTH=1", // month + 1
                    "EXTENDED_YEAR=4638,MONTH=3,DATE=29,IS_LEAP_MONTH=1",  // ch  
               },
               { // dom should pin
                    "en_US@calendar=chinese",         
                    "EXTENDED_YEAR=4638,MONTH=3,DATE=30,IS_LEAP_MONTH=0",  // ch  
                    "add",
                    "MONTH=2", // month + 2
                    "EXTENDED_YEAR=4638,MONTH=4,DATE=30,IS_LEAP_MONTH=0",  // ch  
               },
               { // dom should pin
                    "en_US@calendar=chinese",         
                    "EXTENDED_YEAR=4638,MONTH=3,DATE=30,IS_LEAP_MONTH=0",  // ch  
                    "add",
                    "MONTH=3", // month + 3
                    "EXTENDED_YEAR=4638,MONTH=5,DATE=29,IS_LEAP_MONTH=0",  // ch  
               },
               
               // chinese roll tests
               { // normal
                    "en_US@calendar=chinese",         
                    "EXTENDED_YEAR=4642,MONTH=2,DATE=15,IS_LEAP_MONTH=0",  // ch  
                    "roll",
                    "MONTH=3", // month + 3
                    "EXTENDED_YEAR=4642,MONTH=5,DATE=15,IS_LEAP_MONTH=0",  // ch  
               },
               { // normal
                    "en_US@calendar=chinese",         
                    "EXTENDED_YEAR=4642,MONTH=2,DATE=15,IS_LEAP_MONTH=0",  // ch  
                    "roll",
                    "MONTH=11", // month + 11
                    "EXTENDED_YEAR=4642,MONTH=1,DATE=15,IS_LEAP_MONTH=0",  // ch  
               },
               { // across year
                    "en_US@calendar=chinese",         
                    "EXTENDED_YEAR=4639,MONTH=11,DATE=15,IS_LEAP_MONTH=0",  // ch  
                    "roll",
                    "MONTH=1", // month + 1
                    "EXTENDED_YEAR=4639,MONTH=0,DATE=15,IS_LEAP_MONTH=0",  // ch  
               },
               { // across year
                    "en_US@calendar=chinese",         
                    "EXTENDED_YEAR=4640,MONTH=0,DATE=15,IS_LEAP_MONTH=0",  // ch  
                    "roll",
                    "MONTH=-1", // month - 1
                    "EXTENDED_YEAR=4640,MONTH=11,DATE=15,IS_LEAP_MONTH=0",  // ch  
               },
               { // month=3 is a leap month
                    "en_US@calendar=chinese",         
                    "EXTENDED_YEAR=4638,MONTH=2,DATE=15,IS_LEAP_MONTH=0",  // ch  
                    "roll",
                    "MONTH=3", // month + 3
                    "EXTENDED_YEAR=4638,MONTH=4,DATE=15,IS_LEAP_MONTH=0",  // ch  
               },
               { // month=3 is a leap month
                    "en_US@calendar=chinese",         
                    "EXTENDED_YEAR=4638,MONTH=2,DATE=15,IS_LEAP_MONTH=0",  // ch  
                    "roll",
                    "MONTH=3", // month + 16
                    "EXTENDED_YEAR=4638,MONTH=4,DATE=15,IS_LEAP_MONTH=0",  // ch  
               },
               { // month=3 is a leap month
                    "en_US@calendar=chinese",         
                    "EXTENDED_YEAR=4638,MONTH=2,DATE=15,IS_LEAP_MONTH=0",  // ch  
                    "roll",
                    "MONTH=2", // month + 2
                    "EXTENDED_YEAR=4638,MONTH=3,DATE=15,IS_LEAP_MONTH=1",  // ch  
               },
               { // month=3 is a leap month
                    "en_US@calendar=chinese",         
                    "EXTENDED_YEAR=4638,MONTH=2,DATE=15,IS_LEAP_MONTH=0",  // ch  
                    "roll",
                    "MONTH=28", // month + 28
                    "EXTENDED_YEAR=4638,MONTH=3,DATE=15,IS_LEAP_MONTH=1",  // ch  
               },
               { // month=3 is a leap month
                    "en_US@calendar=chinese",         
                    "EXTENDED_YEAR=4638,MONTH=3,DATE=15,IS_LEAP_MONTH=0",  // ch  
                    "roll",
                    "MONTH=1", // month + 1
                    "EXTENDED_YEAR=4638,MONTH=3,DATE=15,IS_LEAP_MONTH=1",  // ch  
               },
               { // month=3 is a leap month
                    "en_US@calendar=chinese",         
                    "EXTENDED_YEAR=4638,MONTH=3,DATE=15,IS_LEAP_MONTH=0",  // ch  
                    "roll",
                    "MONTH=-12", // month - 12
                    "EXTENDED_YEAR=4638,MONTH=3,DATE=15,IS_LEAP_MONTH=1",  // ch  
               },
               { // month=3 is a leap month
                    "en_US@calendar=chinese",         
                    "EXTENDED_YEAR=4638,MONTH=3,DATE=15,IS_LEAP_MONTH=1",  // ch  
                    "roll",
                    "MONTH=1", // month + 1
                    "EXTENDED_YEAR=4638,MONTH=4,DATE=15,IS_LEAP_MONTH=0",  // ch  
               },
               { // month=3 is a leap month
                    "en_US@calendar=chinese",         
                    "EXTENDED_YEAR=4638,MONTH=3,DATE=15,IS_LEAP_MONTH=1",  // ch  
                    "roll",
                    "MONTH=-25", // month - 25
                    "EXTENDED_YEAR=4638,MONTH=4,DATE=15,IS_LEAP_MONTH=0",  // ch  
               },
               { // dom should pin
                    "en_US@calendar=chinese",         
                    "EXTENDED_YEAR=4638,MONTH=3,DATE=30,IS_LEAP_MONTH=0",  // ch  
                    "roll",
                    "MONTH=1", // month + 1
                    "EXTENDED_YEAR=4638,MONTH=3,DATE=29,IS_LEAP_MONTH=1",  // ch  
               },
               { // dom should pin
                    "en_US@calendar=chinese",         
                    "EXTENDED_YEAR=4638,MONTH=3,DATE=30,IS_LEAP_MONTH=0",  // ch  
                    "roll",
                    "MONTH=14", // month + 14
                    "EXTENDED_YEAR=4638,MONTH=3,DATE=29,IS_LEAP_MONTH=1",  // ch  
               },
               { // no dom pin
                    "en_US@calendar=chinese",         
                    "EXTENDED_YEAR=4638,MONTH=3,DATE=30,IS_LEAP_MONTH=0",  // ch  
                    "roll",
                    "MONTH=15", // month + 15
                    "EXTENDED_YEAR=4638,MONTH=4,DATE=30,IS_LEAP_MONTH=0",  // ch  
               },
               { // dom should pin
                    "en_US@calendar=chinese",         
                    "EXTENDED_YEAR=4638,MONTH=3,DATE=30,IS_LEAP_MONTH=0",  // ch  
                    "roll",
                    "MONTH=-10", // month - 10
                    "EXTENDED_YEAR=4638,MONTH=5,DATE=29,IS_LEAP_MONTH=0",  // ch  
               },
               {
                    "en_US@calendar=hebrew",         
                    "MILLIS=-180799750799999",
                    "add",
                    "YEAR=100000", // year + 100000
                    "MILLIS=2974930006022001",
               },
            }
        }	          
    }	    
}
