How to get Date pattern from Timezone of Locale in Java
The logic translating Locale
to date/time formats is burried in java.text.SimpleDateFormat#SimpleDateFormat
constructor, precisely in sun.util.resources.LocaleData#getDateFormatData
. This method provides ResourceBundle
which is then queried for particular pattern depending on which style was chosen.
In other words - unfortunately JDK doesn't seems to provide an API/SPI to access raw formats. My advice is to use the Locale
all along and pass it to formatting/parsing methods.