[threeten-dev] How to get pattern as a String from DateTimeFormatter
Rodrigo Uchôa
rodrigo.uchoa at gmail.com
Mon Mar 2 22:13:56 UTC 2015
Interesting.
My problem is, I need to the "FormatStyle.SHORT" pattern as a String from a
specified locale at runtime. Is there any other way?
On Mon, Mar 2, 2015 at 4:38 PM, Stephen Colebourne <scolebourne at joda.org>
wrote:
> The pattern is not retained, so this cannot be done.
> Stephen
>
> On 2 March 2015 at 18:50, Rodrigo Uchôa <rodrigo.uchoa at gmail.com> wrote:
> > After building an instance of DateTimeFormatter, is it possible to
> extract
> > from it the pattern as a String?
> >
> > Something like this:
> >
> > DateTimeFormatter formatter = DateTimeFormatter.ofPattern("MM/dd/yyyy");
> > String pattern = formatter.toPattern(); //example
> >
> > Is there any way this can done?
> >
> > Regards!
>
More information about the threeten-dev
mailing list