scuffed-code/icu4c/source/test/testdata/format.txt
Steven R. Loomis 398b2aafc0 ICU-4567 taiwan calendar for C/C++
X-SVN-Rev: 22403
2007-08-16 18:40:18 +00:00

51 lines
1.9 KiB
Plaintext

// Copyright (c) 2007 International Business Machines
// Corporation and others. All Rights Reserved.
format:table(nofallback) {
Info {
Description { "These are the data driven format tests" }
LongDescription { "Data for data driven format tests." }
}
TestData {
TestDateFormatBasic {
Info {
Description { "Test data for format and parse :" }
}
Settings {
// options: 'format', or 'parse'. One can be omitted if this is a 1 way test.
{
Type { "date_format" }
},
{
Type { "date_parse" }
},
}
Headers { "locale","spec", "date", "str"}
// locale: locale including calendar type
// spec: either 'PATTERN=y mm h' etc, or 'DATE=SHORT,TIME=LONG'
// date: either 'MILLIS=####' where #### is an unsigned long (millis), or a calendar spec ERA=0,YEAR=1, etc.. applied to the calendar type specified by the locale
// str: the expected unicode string
Cases {
{
"en_US@calendar=gregorian",
"DATE=SHORT,TIME=SHORT",
"ERA=1,YEAR=2007,MONTH=AUGUST,DATE=8,HOUR_OF_DAY=18,MINUTE=54,SECOND=0",
"8/8/07 6:54 PM"
},
{
"zh_TW@calendar=taiwan",
"DATE=LONG",
"ERA=1,YEAR=98,MONTH=0,DATE=24",
"民國98年1月24日",
},
{
//民國前2年1月24日 -> 1910-1-24
"zh_TW@calendar=taiwan",
"DATE=LONG",
"ERA=0,YEAR=2,MONTH=0,DATE=24",
"民國前2年1月24日",
},
}
}
}
}