I can get the current date with the following code to show in DatePicker dialog for example.
final Calendar c = Calendar.getInstance();
mYear = c.get(Calendar.YEAR);
mMonth = c.get(Calendar.MONTH);
mDay = c.get(Calendar.DAY_OF_MONTH);
How can I show the actual date minus 18years (more or less 6570days)?
From my “research” I need to use DAY_OF_YEAR
Try using:
You shouldn’t have to worry about the “more or less” of 6570 days since a Calendar object handles leap years (and exact number of days in a month itself).