Lines Matching +full:not +full:- +full:date

3  * Copyright (c) 1997-2013 International Business Machines Corporation and
9 * Date Name Description
49 TestData *testData = driver->createTestData(index, status); in runIndexedTest()
51 name = testData->getName(); in runIndexedTest()
52 if (testData->getInfo(info, status)) { in runIndexedTest()
53 log(info->getString("Description", status)); in runIndexedTest()
57 logln("---"); in runIndexedTest()
67 dataerrln("format/DataDriven*Test data (format.res) not initialized!"); in runIndexedTest()
76 * Headers { "locale", "zone", "spec", "date", "str"}
78 // zone: time zone name, or "" to not explicitly set zone
79 // spec: either 'PATTERN=y mm h' etc, or 'DATE=SHORT,TIME=LONG'
80 …// date: either an unsigned long (millis), or a calendar spec ERA=0,YEAR=1, etc.. applied to the…
86 "DATE=SHORT,TIME=SHORT",
87 "ERA=1,YEAR=2007,MONTH=AUGUST,DATE=8,HOUR=18,MINUTE=54,SECOND=12",
101 SimpleDateFormat basicFmt(UnicodeString("EEE MMM dd yyyy / YYYY'-W'ww-ee"), in testConvertDate()
112 while (testData->nextCase(currentCase, status)) { in testConvertDate()
131 UnicodeString locale = currentCase->getString("locale", status); in testConvertDate()
136 UnicodeString zone = currentCase->getString("zone", status); in testConvertDate()
141 UnicodeString spec = currentCase->getString("spec", status); in testConvertDate()
146 UnicodeString date = currentCase->getString("date", status); in testConvertDate() local
148 errln("case %d: No 'date' line.", n); in testConvertDate()
151 UnicodeString expectStr= currentCase->getString("str", status); in testConvertDate()
167 … errln("case %d: could not create SimpleDateFormat from pattern: %s", n, u_errorName(status)); in testConvertDate()
172 errln("case %d: could not parse spec as style fields: %s", n, u_errorName(status)); in testConvertDate()
177 errln("case %d: could not create SimpleDateFormat from styles.", n); in testConvertDate()
184 errln("case %d: could not create calendar from %s", n, calLoc); in testConvertDate()
189 cal->setTimeZone(*tz); in testConvertDate()
190 format->setTimeZone(*tz); in testConvertDate()
194 // parse 'date' in testConvertDate()
195 if(date.startsWith(kMILLIS)) { in testConvertDate()
196 UnicodeString millis = UnicodeString(date, kMILLIS.length()); in testConvertDate()
199 } else if(date.startsWith(kRELATIVE_MILLIS)) { in testConvertDate()
200 UnicodeString millis = UnicodeString(date, kRELATIVE_MILLIS.length()); in testConvertDate()
203 } else if(date.startsWith(kRELATIVE_ADD)) { in testConvertDate()
204 …UnicodeString add = UnicodeString(date, kRELATIVE_ADD.length()); // "add" is a string indicating … in testConvertDate()
206 …errln("case %d: could not parse date as RELATIVE_ADD calendar fields: %s", n, u_errorName(status)); in testConvertDate()
210 cal->clear(); in testConvertDate()
211 cal->setTime(now, status); in testConvertDate()
214 //int32_t oldv = cal->get((UCalendarDateFields)q, status); in testConvertDate()
216 cal->add((UCalendarDateFields)q, in testConvertDate()
219 cal->set((UCalendarDateFields)q, in testConvertDate()
222 //int32_t newv = cal->get((UCalendarDateFields)q, status); in testConvertDate()
225 fromDate = cal->getTime(status); in testConvertDate()
227 …errln("case %d: could not apply date as RELATIVE_ADD calendar fields: %s", n, u_errorName(status)); in testConvertDate()
230 } else if(fromSet.parseFrom(date, status)<0 || U_FAILURE(status)) { in testConvertDate()
231 errln("case %d: could not parse date as calendar fields: %s", n, u_errorName(status)); in testConvertDate()
240 cal->clear(); in testConvertDate()
245 // cal->setTime(fromDate, status); in testConvertDate()
247 // errln("case %d: could not set time on calendar: %s", n, u_errorName(status)); in testConvertDate()
250 format->format(fromDate, output, pos, status); in testConvertDate()
254 errln("case %d: could not set fields on calendar: %s", n, u_errorName(status)); in testConvertDate()
257 format->format(*cal, output, pos); in testConvertDate()
262 errln("case %d: could not format(): %s", n, u_errorName(status)); // TODO: use 'pos' in testConvertDate()
265 // errln("WARNING: case %d: format's pos returned (0,0) - error ??", n); in testConvertDate()
276 cal->clear(); in testConvertDate()
278 format->parse(expectStr,*cal,pos); in testConvertDate()
280 UDate gotDate = cal->getTime(status); in testConvertDate()
282 … errln(caseString+": parse: could not get time on calendar: "+UnicodeString(u_errorName(status))); in testConvertDate()
294 // Calendar *cal2 = cal->clone(); in testConvertDate()
295 // cal2->clear(); in testConvertDate()
298 … errln("case %d: parse: could not set fields on calendar: %s", n, u_errorName(status)); in testConvertDate()
337 while (testData->nextSettings(settings, status)) { in processTest()
340 testSetting = settings->getString("Type", status); in processTest()
343 logln("---"); in processTest()
345 logln(testSetting + "---"); in processTest()