Here you can find the source of formatMinDateForShowWith_(String str)
public static String formatMinDateForShowWith_(String str)
//package com.java2s; //License from project: Open Source License public class Main { public static String formatMinDateForShowWith_(String str) { String res = ""; try {/*from ww w. j a v a2 s . c o m*/ if (str.length() >= 4) { res += str.substring(0, 4); } if (str.length() >= 6) { res += "-" + Integer.parseInt(str.substring(4, 6)); } if (str.length() >= 8) { res += "-" + Integer.parseInt(str.substring(6, 8)); } } catch (Exception e) { e.printStackTrace(); } finally { } return res; } }