Lines Matching refs:UnicodeString
24 #define CASE(id,test) case id: name = #test; if (exec) { logln(#test "---"); logln((UnicodeString)""); test(); } break;
29 // if (exec) logln((UnicodeString)"TestSuite DateFormatRegressionTest");
70 logln((UnicodeString) "today: " + today);
76 UnicodeString pat;
84 UnicodeString fmtd;
90 UnicodeString todayS;
96 logln((UnicodeString)"today date: " + today);
102 UnicodeString rt;
131 UnicodeString str;
138 UnicodeString expected[] = {
139 (UnicodeString) "", //"ERA_FIELD",
140 (UnicodeString) "97", //"YEAR_FIELD",
141 (UnicodeString) "5", //"MONTH_FIELD",
142 (UnicodeString) "3", //"DATE_FIELD",
143 (UnicodeString) "", //"HOUR_OF_DAY1_FIELD",
144 (UnicodeString) "", //"HOUR_OF_DAY0_FIELD",
145 (UnicodeString) "55", //"MINUTE_FIELD",
146 (UnicodeString) "", //"SECOND_FIELD",
147 (UnicodeString) "", //"MILLISECOND_FIELD",
148 (UnicodeString) "", //"DAY_OF_WEEK_FIELD",
149 (UnicodeString) "", //"DAY_OF_YEAR_FIELD",
150 (UnicodeString) "", //"DAY_OF_WEEK_IN_MONTH_FIELD",
151 (UnicodeString) "", //"WEEK_OF_YEAR_FIELD",
152 (UnicodeString) "", //"WEEK_OF_MONTH_FIELD",
153 (UnicodeString) "AM", //"AM_PM_FIELD",
154 (UnicodeString) "8", //"HOUR1_FIELD",
155 (UnicodeString) "", //"HOUR0_FIELD",
156 (UnicodeString) "" //"TIMEZONE_FIELD"
168 UnicodeString fieldNames[] = {
169 (UnicodeString) "ERA_FIELD",
170 (UnicodeString) "YEAR_FIELD",
171 (UnicodeString) "MONTH_FIELD",
172 (UnicodeString) "DATE_FIELD",
173 (UnicodeString) "HOUR_OF_DAY1_FIELD",
174 (UnicodeString) "HOUR_OF_DAY0_FIELD",
175 (UnicodeString) "MINUTE_FIELD",
176 (UnicodeString) "SECOND_FIELD",
177 (UnicodeString) "MILLISECOND_FIELD",
178 (UnicodeString) "DAY_OF_WEEK_FIELD",
179 (UnicodeString) "DAY_OF_YEAR_FIELD",
180 (UnicodeString) "DAY_OF_WEEK_IN_MONTH_FIELD",
181 (UnicodeString) "WEEK_OF_YEAR_FIELD",
182 (UnicodeString) "WEEK_OF_MONTH_FIELD",
183 (UnicodeString) "AM_PM_FIELD",
184 (UnicodeString) "HOUR1_FIELD",
185 (UnicodeString) "HOUR0_FIELD",
186 (UnicodeString) "TIMEZONE_FIELD"
192 UnicodeString buf;
195 UnicodeString dst;
197 UnicodeString str(dst);
198 logln((UnicodeString)"" + i + (UnicodeString)": " + fieldNames[i] +
199 (UnicodeString)", \"" + str + (UnicodeString)"\", " +
200 pos.getBeginIndex() + (UnicodeString)", " +
202 UnicodeString exp = expected[i];
206 errln(UnicodeString(" expected ") + exp);
226 SimpleDateFormat *fmt = new SimpleDateFormat(UnicodeString("yyMMdd"), Locale::getUS(), status);
243 UnicodeString strings [] = {
244 (UnicodeString) "091225",
245 (UnicodeString) "091224",
246 (UnicodeString) "091226",
247 (UnicodeString) "611225"
258 UnicodeString s = strings[i];
283 UnicodeString myDate;
285 fmt = new SimpleDateFormat( UnicodeString("yyyy/MM/dd"), status );
293 fmt = new SimpleDateFormat( UnicodeString("yyyyMMdd"), status );
301 void DateFormatRegressionTest::aux917( SimpleDateFormat *fmt, UnicodeString& str ) {
303 UnicodeString pat;
314 //logln( UnicodeString("Parsed object: ") + o );
317 UnicodeString formatted;
336 UnicodeString dateString = "1995-040.05:01:29";
341 SimpleDateFormat *formatter = new SimpleDateFormat(UnicodeString("yyyy-DDD.hh:mm:ss"), status);
345 UnicodeString myString;
362 errln((UnicodeString) "Fail: Got " + cal->get(UCAL_DAY_OF_YEAR, status) +
368 formatter = new SimpleDateFormat(UnicodeString("yyyy-ddd.hh:mm:ss"), status);
377 errln((UnicodeString) "Fail: Got " + cal->get(UCAL_DAY_OF_YEAR, status) +
392 SimpleDateFormat *df = new SimpleDateFormat(UnicodeString("dd/MM/yyyy"), status);
400 logln(UnicodeString("") + df->parse("35/01/1971", status));
411 logln(UnicodeString("") + df->parse("35/01/1971", status));
428 UnicodeString strShortDate, strFullDate;
453 UnicodeString temp;
457 UnicodeString temp2;
470 //(UnicodeString) "java.text.resources.DateFormatZoneData", curLocale);
473 /*if (bundle->getLocale().getLanguage(temp) == UnicodeString("de")) {
475 if (!strFullDate.endsWith(UnicodeString("GMT-05:00")))
575 UnicodeString tests [] = {
576 (UnicodeString) "12/25/61",
577 (UnicodeString) "12/25/1961",
578 (UnicodeString) "4/3/2010",
579 (UnicodeString) "4/3/10"
587 UnicodeString s;
589 UnicodeString ss;
592 errln((UnicodeString) "Fail: " + d + " != " + dd);
594 errln((UnicodeString)"Fail: " + s + " != " + ss);
709 SimpleDateFormat *sdf = new SimpleDateFormat(UnicodeString("z"), Locale::getUS(), status);
715 UnicodeString buf;
742 SimpleDateFormat *df = new SimpleDateFormat(UnicodeString("MMMM"), Locale::getUS(), status);
745 UnicodeString s;
747 UnicodeString s2;
752 UnicodeString substr;
771 SimpleDateFormat *simple = new SimpleDateFormat(UnicodeString("MM/dd/yyyy HH:mm"), status);
803 UnicodeString pattern = "'time' hh:mm";
807 UnicodeString strings [] = {
808 (UnicodeString)"time 10:30",
809 (UnicodeString) "time 10:x",
810 (UnicodeString) "time 10x"
832 UnicodeString text = strings[i];
840 logln((UnicodeString) " result: " + d);
844 errln((UnicodeString) "Fail: Expected result " + exp);
868 UnicodeString pattern = "'time' hh:mm";
874 UnicodeString text = "time ";
899 new SimpleDateFormat(UnicodeString("yyyyMMddHHmmss"), status),
900 new SimpleDateFormat(UnicodeString("yyyyMMddHHmmss'Z'"), status),
901 new SimpleDateFormat(UnicodeString("yyyyMMddHHmmss''"), status),
902 new SimpleDateFormat(UnicodeString("yyyyMMddHHmmss'a''a'"), status),
903 new SimpleDateFormat(UnicodeString("yyyyMMddHHmmss %"), status)
917 UnicodeString strings [] = {
918 (UnicodeString) "19980211140000",
919 (UnicodeString) "19980211140000",
920 (UnicodeString) "19980211140000",
921 (UnicodeString) "19980211140000a",
922 (UnicodeString) "19980211140000 "
942 UnicodeString dateString = strings[i];
950 UnicodeString fmtd;
957 logln(UnicodeString("") + gc->get(UCAL_ZONE_OFFSET, status));
959 UnicodeString s;
1007 UnicodeString dateFormat = "MM/dd/yy HH:mm:ss zzz";
1027 UnicodeString pattern = "'TO_DATE('''dd'-'MM'-'yyyy HH:mm:ss''' , ''DD-MM-YYYY HH:MI:SS'')'";
1032 UnicodeString result;
1052 UnicodeString dateString("Thursday, 31-Dec-98 23:00:00 GMT");
1054 SimpleDateFormat fmt(UnicodeString("EEEE, dd-MMM-yy HH:mm:ss z"), Locale::getUS(), status);
1065 UnicodeString temp;
1078 UnicodeString dateString("Thu, 30-Jul-1999 11:51:14 GMT");
1079 UnicodeString format("EEE', 'dd-MMM-yyyy HH:mm:ss z"); // RFC 822/1123
1093 UnicodeString temp;
1141 UnicodeString out;
1144 UnicodeString str(STRINGS[i]);
1151 UnicodeString actStr;
1162 UnicodeString expStr;
1188 UnicodeString pattern("MMM d, yyyy");
1200 UnicodeString s, ss;
1206 logln(UnicodeString("\"") + s + "\" p> " + pattern +
1208 logln(UnicodeString("Parse pos = ") + pos.getIndex() +
1211 errln(UnicodeString("FAIL: Error index should be -1"));
1225 logln(UnicodeString("Attempt to set Calendar to Feb 29 2000: ") +
1244 UnicodeString s;
1245 UnicodeString tests =
1246 (UnicodeString) "7:25:43 AM" ;
1251 errln((UnicodeString) "Fail, errmsg " + u_errorName(status));
1257 errln((UnicodeString) "Fail: " + s + " != " + tests);
1276 UnicodeString data;
1277 UnicodeString normalized;
1328 UnicodeString pattern("yyyy MM WW EEE","");
1348 errln(UnicodeString("Error setting up test: ") + u_errorName(status));
1353 logln(UnicodeString("#") + i + UnicodeString("\n-----\nTesting round trip of ") + test.year +
1370 errln((UnicodeString)"\nError: GregorianUCAL_DOM gave " + ms +
1379 errln("parse exception: " + UnicodeString(u_errorName(status)));
1383 errln((UnicodeString)"\nError: GregorianCalendar gave " + ms +
1390 UnicodeString result;
1404 errln("parse exception 2: " + (UnicodeString)u_errorName(status));
1409 errln((UnicodeString)"\nError: Re-parse of '" + result + "' gave time of " +
1417 UnicodeString info
1418 = UnicodeString("Passed: ") + pass + ", Warnings: " + warning + ", Errors: " + error;
1435 UnicodeString pattern("Z","");
1436 UnicodeString newfoundland("Canada/Newfoundland", "");
1453 UnicodeString result;
1454 UnicodeString correct("-0330", "");