Home | History | Annotate | Download | only in intltest

Lines Matching refs:dateFormat

44 DateFormatRoundTripTest::DateFormatRoundTripTest() : dateFormat(0) {
48 delete dateFormat;
141 const Locale *avail = DateFormat::getAvailableLocales(locCount);
142 logln("DateFormat available locales: %d", locCount);
192 static const char *styleName(DateFormat::EStyle s)
196 case DateFormat::SHORT: return "SHORT";
197 case DateFormat::MEDIUM: return "MEDIUM";
198 case DateFormat::LONG: return "LONG";
199 case DateFormat::FULL: return "FULL";
200 // case DateFormat::DEFAULT: return "DEFAULT";
201 case DateFormat::DATE_OFFSET: return "DATE_OFFSET";
202 case DateFormat::NONE: return "NONE";
203 case DateFormat::DATE_TIME: return "DATE_TIME";
236 for(style = DateFormat::FULL; style <= DateFormat::SHORT; ++style) {
238 logln("Testing style " + UnicodeString(styleName((DateFormat::EStyle)style)));
239 DateFormat *df = DateFormat::createDateInstance((DateFormat::EStyle)style, loc);
241 errln(UnicodeString("Could not DF::createDateInstance ") + UnicodeString(styleName((DateFormat::EStyle)style)) + " Locale: " + loc.getDisplayName(temp));
249 for(style = DateFormat::FULL; style <= DateFormat::SHORT; ++style) {
251 logln("Testing style " + UnicodeString(styleName((DateFormat::EStyle)style)));
252 DateFormat *df = DateFormat::createTimeInstance((DateFormat::EStyle)style, loc);
254 errln(UnicodeString("Could not DF::createTimeInstance ") + UnicodeString(styleName((DateFormat::EStyle)style)) + " Locale: " + loc.getDisplayName(temp));
262 for(int32_t dstyle = DateFormat::FULL; dstyle <= DateFormat::SHORT; ++dstyle) {
263 for(int32_t tstyle = DateFormat::FULL; tstyle <= DateFormat::SHORT; ++tstyle) {
265 logln("Testing dstyle" + UnicodeString(styleName((DateFormat::EStyle)dstyle)) + ", tstyle" + UnicodeString(styleName((DateFormat::EStyle)tstyle)) );
266 DateFormat *df = DateFormat::createDateTimeInstance((DateFormat::EStyle)dstyle, (DateFormat::EStyle)tstyle, loc);
268 dataerrln(UnicodeString("Could not DF::createDateTimeInstance ") + UnicodeString(styleName((DateFormat::EStyle)dstyle)) + ", tstyle" + UnicodeString(styleName((DateFormat::EStyle)tstyle)) + "Locale: " + loc.getDisplayName(temp));
278 void DateFormatRoundTripTest::test(DateFormat *fmt, const Locale &origLocale, UBool timeOnly)
282 errln("DateFormat wasn't a SimpleDateFormat");
488 if (dateFormat == 0) {
489 dateFormat = new SimpleDateFormat((UnicodeString)"EEE MMM dd HH:mm:ss.SSS zzz yyyy G", ec);
490 if (U_FAILURE(ec) || dateFormat == 0) {
492 delete dateFormat;
493 dateFormat = 0;
498 dateFormat->format(d, fgStr);