DateFormat[] () { CF cf = Native.load("CoreFoundation", CF.class); Pointer localeRef = cf.CFLocaleCopyCurrent(); try { String localeId = getMacString(cf, cf.CFLocaleGetIdentifier(localeRef)); if (LOG.isTraceEnabled()) LOG.trace("id=" + localeId); Locale locale = getLocaleById(localeId); return new DateFormat[]{ getMacFormat(cf, localeRef, CF.kCFDateFormatterShortStyle, CF.kCFDateFormatterNoStyle, locale), // short date getMacFormat(cf, localeRef, CF.kCFDateFormatterNoStyle, CF.kCFDateFormatterShortStyle, locale), // short time getMacFormat(cf, localeRef, CF.kCFDateFormatterNoStyle, CF.kCFDateFormatterMediumStyle, locale), // medium time getMacFormat(cf, localeRef, CF.kCFDateFormatterShortStyle, CF.kCFDateFormatterShortStyle, locale) // short date/time }; } finally { cf.CFRelease(localeRef); } }