I want to format correctly according to the device configuration a date, but I want to force YYYY instead of YY. My current code is the following:
java.text.DateFormat dateFormat = android.text.format.
                DateFormat.getDateFormat(context);
String fDate = dateFormat.format(date);
For example, if dateFormat is dd/mm/yy it must become dd/mm/yyyy, if dateFormat is yy/mm/dd it must become yyyy/mm/dd and so on.
 
    