In android I use this code to get the current date:
String phone_date = new SimpleDateFormat("yyyy-MM-dd", Locale.getDefault()).format(new Date());
It will display 2019-03-05
Asia Time Basis.
If I go to settings of my phone and change it to 2019-03-04
, the code above will give me the same.
How can I check if the date is today? I found solutions that mostly requires net but my app is offline.
Is there any way to check it, like compare it to phones internal date?