Logo Search packages:      
Sourcecode: icu version File versions

DateFormat * 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.

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

Definition at line 210 of file datefmt.cpp.

References DateFormat::create().

Referenced by MessageFormat::makeFormat(), DateFormatRegressionTest::Test4029195(), DateFormatRegressionTest::Test4065240(), DateFormatRegressionTest::Test4073003(), DateFormatTest::TestCzechMonths459(), DateFormatTest::TestDateFormatCalendar(), DateFormatTest::TestDayOfYearPattern195(), NumberFormatRegressionTest::TestJ691(), IntlTestDateFormat::testLocale(), DateFormatTest::TestTwoDigitYear(), 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