String LocaleWin::shortTimeFormat() { if (!m_timeFormatWithoutSeconds.isNull()) return m_timeFormatWithoutSeconds; String format = getLocaleInfoString(LOCALE_SSHORTTIME); // Vista or older Windows doesn't support LOCALE_SSHORTTIME. if (format.isEmpty()) { format = timeFormat(); StringBuilder builder; builder.append(getLocaleInfoString(LOCALE_STIME)); builder.append("ss"); size_t pos = format.reverseFind(builder.toString()); if (pos != notFound) format.remove(pos, builder.length()); } m_timeFormatWithoutSeconds = convertWindowsTimeFormatToLDML(format); return m_timeFormatWithoutSeconds; }
String LocaleWin::timeFormatText() { if (m_timeFormatText.isEmpty()) m_timeFormatText = convertWindowsTimeFormatToLDML(getLocaleInfoString(LOCALE_STIMEFORMAT)); return m_timeFormatText; }
String LocaleWin::timeFormat() { if (m_timeFormatWithSeconds.isNull()) m_timeFormatWithSeconds = convertWindowsTimeFormatToLDML(getLocaleInfoString(LOCALE_STIMEFORMAT)); return m_timeFormatWithSeconds; }