public static String[] ymr(long time) { String ymr[] = new String[3]; Date dt = new Date(time); String year = String.format("%tY", dt); String mon = String.format("%tm", dt); String day = String.format("%td", dt); ymr[0] = year; ymr[1] = mon; ymr[2] = day; return ymr; }