android - some DateFormat AM/PM formatting options don't appear to be working on AVD for API Level 8 -


android.text.format.dateformat specifies using format string 'a' should yield 'a' or 'p' , 'aa' should yield 'am' or 'pm'. however, on avd, using 'a', 'a', or 'aa' yields 'am' or 'pm' not congruent on-line documentation.

final long currenttimemillis = system.currenttimemillis();  log.i("dateformat", "a: " + (string) dateformat.format("a", currenttimemillis)); log.i("dateformat", "aa: " + (string) dateformat.format("aa", currenttimemillis)); log.i("dateformat", "a: " + (string) dateformat.format("a", currenttimemillis)); log.i("dateformat", "aa: " + (string) dateformat.format("aa", currenttimemillis)); 

since dateformat has been available since api level 3, running regression or there wrong development environment? (i'm new android don't have experience framework yet). avd configured api level 8 , i'm using eclipse.

try using simpledateformat explained on android developer

simpledateformat sdf = new simpledateformat("a hh-mm-ss"); date = new date(); sdate = sdf.format(date); 

Comments

Popular posts from this blog

c# - how to write client side events functions for the combobox items -

exception - Python, pyPdf OCR error: pyPdf.utils.PdfReadError: EOF marker not found -