Commit 6ab68e4a authored by tkent@chromium.org's avatar tkent@chromium.org
Browse files

[Mac][Chromium-Mac] Implement LocaleMac::dateFormat

https://bugs.webkit.org/show_bug.cgi?id=98116

Reviewed by Hajime Morita.

http://trac.webkit.org/changeset/130127 introduced
Localizer::dateFormat, and this is its implementation for LocaleICU
classs. The code is going to be used when
ENABLE_INPUT_MULTIPLE_FIELDS_UI is enabled.

No new tests. The function is not used yet.

* platform/text/mac/LocaleMac.h:
(LocaleMac): Declare m_dateFormat.
* platform/text/mac/LocaleMac.mm:
(WebCore::LocaleMac::dateFormat): Implemented.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130243 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent c934c4b0
2012-10-02 Kent Tamura <tkent@chromium.org>
[Mac][Chromium-Mac] Implement LocaleMac::dateFormat
https://bugs.webkit.org/show_bug.cgi?id=98116
Reviewed by Hajime Morita.
http://trac.webkit.org/changeset/130127 introduced
Localizer::dateFormat, and this is its implementation for LocaleICU
classs. The code is going to be used when
ENABLE_INPUT_MULTIPLE_FIELDS_UI is enabled.
No new tests. The function is not used yet.
* platform/text/mac/LocaleMac.h:
(LocaleMac): Declare m_dateFormat.
* platform/text/mac/LocaleMac.mm:
(WebCore::LocaleMac::dateFormat): Implemented.
2012-10-02 Kent Tamura <tkent@chromium.org>
[Chromium-Win] Implement LocaleWin::dateFormat
......
......@@ -82,6 +82,7 @@ private:
NSDateFormatter *createTimeFormatter();
NSDateFormatter *createShortTimeFormatter();
String m_dateFormat;
String m_localizedTimeFormatText;
String m_localizedShortTimeFormatText;
Vector<String> m_timeAMPMLabels;
......
......@@ -254,8 +254,11 @@ NSDateFormatter* LocaleMac::createShortTimeFormatter()
String LocaleMac::dateFormat()
{
// FIXME: We should have real implementation of LocaleMac::dateFormat().
return emptyString();
if (!m_dateFormat.isEmpty())
return m_dateFormat;
RetainPtr<NSDateFormatter> formatter(AdoptNS, createShortDateFormatter());
m_dateFormat = String([formatter.get() dateFormat]);
return m_dateFormat;
}
String LocaleMac::timeFormat()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment