From 5ecabf7902a942666182a447d08ecc83062f985b Mon Sep 17 00:00:00 2001 From: "Hoa V. DINH" Date: Thu, 11 Sep 2014 21:36:43 -0700 Subject: Fixed date formatter, CoreFoundation format --- src/core/renderer/MCDateFormatter.cc | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/core/renderer') diff --git a/src/core/renderer/MCDateFormatter.cc b/src/core/renderer/MCDateFormatter.cc index 2882977d..96d347d5 100644 --- a/src/core/renderer/MCDateFormatter.cc +++ b/src/core/renderer/MCDateFormatter.cc @@ -216,6 +216,12 @@ void DateFormatter::prepare() localeRef = CFLocaleCopyCurrent(); } mAppleDateFormatter = CFDateFormatterCreate(NULL, localeRef, toAppleStyle(mDateStyle), toAppleStyle(mTimeStyle)); + if (mDateFormat != NULL) { + CFStringRef dateFormatCFString = CFStringCreateWithCharacters(NULL, (const UniChar *) mDateFormat->unicodeCharacters(), + mDateFormat->length()); + CFDateFormatterSetFormat((CFDateFormatterRef) mAppleDateFormatter, dateFormatCFString); + CFRelease(dateFormatCFString); + } if (localeIdentifier != NULL) { CFRelease(localeIdentifier); } -- cgit v1.2.3