diff options
author | Hoa V. DINH <dinh.viet.hoa@gmail.com> | 2014-09-11 21:36:43 -0700 |
---|---|---|
committer | Hoa V. DINH <dinh.viet.hoa@gmail.com> | 2014-09-11 22:01:01 -0700 |
commit | 5ecabf7902a942666182a447d08ecc83062f985b (patch) | |
tree | df79cff7f6e9eb2cccfef4740899f1639d781116 /src/core/renderer | |
parent | b7b76c7b3a156146dc69047a43645f5ac4d8a663 (diff) |
Fixed date formatter, CoreFoundation format
Diffstat (limited to 'src/core/renderer')
-rw-r--r-- | src/core/renderer/MCDateFormatter.cc | 6 |
1 files changed, 6 insertions, 0 deletions
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); } |