List of utility methods to do Year Get
String | getYear() get Year GregorianCalendar calendar = new GregorianCalendar(); String year = new Integer(calendar.get(GregorianCalendar.YEAR)).toString(); return year; |
String | getYear() get Year return sdfYear.format(new Date()); |
String | getYear() get Year String str = ""; final SimpleDateFormat sdf = new SimpleDateFormat("yyyy"); final Date date = new Date(); str = sdf.format(date); return str; |
int | getYear() get Year Calendar calendar = Calendar.getInstance();
return calendar.get(Calendar.YEAR);
|
int | getYear() get Year GregorianCalendar calendar = new GregorianCalendar(); calendar.setTime(getDate()); return calendar.get(Calendar.YEAR); |
String | getYear() get Year Date date = new Date(); SimpleDateFormat formatter; String pattern = "yyyy"; formatter = new SimpleDateFormat(pattern, new Locale("ko", "KOREA")); return formatter.format(date); |
int | getYear() get Year Calendar mycd = Calendar.getInstance();
return mycd.get(Calendar.YEAR);
|
String | getYear() get Year return format(getCurrDate(), YYYY);
|
String | getYear() get Year Calendar cal = Calendar.getInstance(TimeZone.getDefault()); String DATE_FORMAT = "yyyy"; java.text.SimpleDateFormat sdf = new java.text.SimpleDateFormat(DATE_FORMAT); sdf.setTimeZone(TimeZone.getDefault()); String now = sdf.format(cal.getTime()); return now; |
String | getYear() get Year return format(getCurrDate(), YYYY);
|