I'm developing an app which is able to get the timing info of a post.
What i want is to display the time in milli into date to make it user friendly but I need to pay attention to the format of date defined in the settings of the android device.
In case it's dd/mm/yyyy or mm/dd/yyyy or yyyy/dd/mm
when I'm able to determine the format, I just need to get the day and month. year is useless for me.
I have done the code below, but I do not like the fact I'm using substring because if 01/02 become 1/2 It's not working
DateFormat.getDateInstance(DateFormat.SHORT).format(new Date(tweetsCreatedTime)).substring(0,5)
tweetsCreatedTime is in millisec and defined as long
Instead of using local, it's better to get the settings and make sure that even if local is showing EN or US, the user do not change the way it should be displayed.
Thanks