SimpleDateFormat dateformate = new SimpleDateFormat("dd-MMM-yyyy");
Calendar currentDate = Calendar.getInstance();
String currentDateStr = dateformate.format(currentDate.getTime());
Log.i("Infoe ", " " + currentDateStr.toString());
System.out.println("Current date is : " + currentDateStr);
////=== OR
SimpleDateFormat sdf = new SimpleDateFormat("dd-MMM-yyyy");
sdf.applyPattern("dd-MMM-yyyy");
Date x = new Date(currentDate.get(Calendar.YEAR) - 1900,
currentDate.get(Calendar.MONTH), currentDate.get(Calendar.DAY_OF_MONTH));
Log.i("Infoe ", " " + sdf.format(x));
System.out.println(sdf.format(x));
その 3912 bcz ...日付は次のように設定されます... Calendar.set(年 + 1900、月、日) または GregorianCalendar(年 + 1900、月、日)。グレゴリオ暦に従って
日付は非推奨であるため、カレンダーの使用はgdだと思います... nd日付形式にはdd-MMM-yyyy no dd-MM-yyyy bczを使用します月の最初の2文字が必要です...
日付形式の場合