Wednesday, 15 May 2013

java - How to get a localized date format for EditText hint in android -



java - How to get a localized date format for EditText hint in android -

how localized date format edittext hint in android?

yyyy-mm-dd(en) aaaa-mm-dd(sp) aaaa-mm-jj(fr)

you can utilize dateformat.getdateformat(context), following:

returns dateformat object can format date in short form (such 12/31/1999) according current locale , user's date-order preference.

  -- dateformat documentation

then, pass object of type activity or context:

java.text.dateformat formatter = android.text.format.dateformat.getdateformat(context);

java android localization date-format

No comments:

Post a Comment