Quantcast
Channel: 質問!ITmedia 新着質問(Java/253)
Viewing all articles
Browse latest Browse all 2439

和暦変換フォーマット用メソッドについて

$
0
0
private void 生年月日編集(String 生年月日, PrintWriter out) { SimpleDateFormat sdf1 = new SimpleDateFormat(生年月日); sdf1.setLenient(false); Date d = sdf1.parse("20120705", new ParsePosition(0)); SimpleDateFormat sdf2 = new SimpleDateFormat("GGGGyyyy年M月d日", new Locale("ja", "JP", "JP")); System.out.println(sdf2.format(d)); 上記の和暦変換プログラムを フォーマット用メソッドとして和暦変換プログラムを呼び だすようにしたいのですが うまくいきません。 アドバイスよろしくお願いいたします。

Viewing all articles
Browse latest Browse all 2439

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>