Keep in mind though that sdf is not threadsafe...
–
Joeri HendrickxMar 7 '11 at 14:34

the example would not have threading issue. If you decide to have the formatter as an instance field, rather than a local variable, then be careful with thread-safety. You can use a ThreadLocal (common-practice)
–
BozhoMar 7 '11 at 14:51

It will not work with locales where "aug" in not month name.
–
Michał NiklasMar 8 '11 at 6:37

1

@Michał Niklas that is true, but it isn't a part of the requirement (or at least I don't know if it is) :)
–
BozhoMar 8 '11 at 6:49

While example given by Bozho is good for English locale it may not work in other locales (as long as "aug" is not month name in other locale). For my environment with Polish locales I would rather use something like: