Hello Onkar,
I don't know whether I got your question right. If you want to format a date for a given locale you would perform the following steps:
But this is not your question, right? You want to retrieve the
pattern that is used for formatting?
I think, there is a kind of dirty way to retrive the actual pattern. If you have a look at the runtime type of the DateFormat from above, this will usually be a SimpleDateFormat. And the SimpleDateFormat has a method toPattern(). Therefore, you can try to retrieve the pattern as follows:
In case your DateFormat instance is not a SimpleDateFormat you could create a fallback solution by defining some kind of dummy date, use the steps of the first code block to retrive a formatted instance and use this one to get the numbering order and separating characters.
Hope this helps,
Thomas