#include "unicode/unistr.h"
#include "unicode/unum.h"
#include "unicode/ures.h"
+#include "unicode/ustring.h"
#include "ureslocs.h"
#include "uresimp.h"
#include "ustr_imp.h"
case UATIMEUNITFIELD_HOUR: munit = MeasureUnit::createHour(*status); break;
case UATIMEUNITFIELD_MINUTE: munit = MeasureUnit::createMinute(*status); break;
case UATIMEUNITFIELD_SECOND: munit = MeasureUnit::createSecond(*status); break;
+ case UATIMEUNITFIELD_MILLISECOND: munit = MeasureUnit::createMillisecond(*status); break;
+ case UATIMEUNITFIELD_MICROSECOND: munit = MeasureUnit::createMicrosecond(*status); break;
+ case UATIMEUNITFIELD_NANOSECOND: munit = MeasureUnit::createNanosecond(*status); break;
default: *status = U_ILLEGAL_ARGUMENT_ERROR; break;
}
if (U_FAILURE(*status)) {
U_CAPI double U_EXPORT2
-uatmufmt_parse( const UATimeUnitFormat* mfmt,
- const UChar* text,
- int32_t textLength,
- int32_t* parsePos,
- UATimeUnitField* field,
+uatmufmt_parse( const UATimeUnitFormat*,
+ const UChar*,
+ int32_t,
+ int32_t*,
+ UATimeUnitField*,
UErrorCode* status)
{
- double doubleVal = 0.0;
- if (U_FAILURE(*status)) {
- return doubleVal;
+ if (!U_FAILURE(*status)) {
+ *status = U_UNSUPPORTED_ERROR;
}
- *status = U_UNSUPPORTED_ERROR;
- return doubleVal;
+ return 0.0;
}