List of utility methods to do Year Current
int | getYear() get Year synchronized (cal) { cal.setTime(new Date()); return cal.get(Calendar.YEAR); |
int | getYear() get Year return getYear(new Date()).intValue(); |
int | getYear() get Year Calendar mycd = Calendar.getInstance();
return mycd.get(Calendar.YEAR);
|
String | getYear() get Year return calendar.get(Calendar.YEAR) + ""; |
String | getYear() get Year Calendar CD = Calendar.getInstance(); int YY = CD.get(Calendar.YEAR); StringBuffer curDateString = new StringBuffer(); curDateString.append(YY); return curDateString.toString(); |
int | getYear() get Year Calendar calendar = new GregorianCalendar(); Date trialTime = new Date(); calendar.setTime(trialTime); return calendar.get(Calendar.YEAR); |
int | getYear() get Year return getField(new Date(), Calendar.YEAR); |
int | year() year return Calendar.getInstance().get(Calendar.YEAR);
|
String | year() year Calendar cal = Calendar.getInstance();
return String.valueOf(cal.get(Calendar.YEAR));
|
int | year() year return calendar().get(Calendar.YEAR);
|