Logo Search packages:      
Sourcecode: icu version File versions

DateFormat *U_EXPORT2 DateFormat::createDateInstance ( DateFormat::EStyle  style = kDefault,
const Locale aLocale = Locale::getDefault() 
) [static, inherited]

Creates a date formatter with the given formatting style for the given const locale.

Parameters:
style The given formatting style. For example, SHORT for "M/d/yy" in the US locale.
aLocale The given locale.
Returns:
A date formatter which the caller owns. ICU 2.0

Definition at line 244 of file datefmt.cpp.

References DateFormat::create().

Referenced by MessageFormat::makeFormat(), DateFormatRegressionTest::Test4029195(), DateFormatRegressionTest::Test4065240(), DateFormatTest::TestCzechMonths459(), DateFormatTest::TestDateFormatCalendar(), DateFormatTest::TestDayOfYearPattern195(), NumberFormatRegressionTest::TestJ691(), IntlTestDateFormat::testLocale(), and MessageFormat::toPattern().

{
    // +4 to set the correct index for getting data out of
    // LocaleElements.
    if(style != kNone)
    {
        style = (EStyle) (style + kDateOffset);
    }
    return create(kNone, (EStyle) (style), aLocale);
}


Generated by  Doxygen 1.6.0   Back to index