List of utility methods to do Year Current
int | getCurrentYear() Answer the current year return (new GregorianCalendar()).get(Calendar.YEAR); |
int | getCurrentYear() Returns the current year from the system Calendar calendar . int returnValue; returnValue = Calendar.getInstance().get(Calendar.YEAR); return returnValue; |
int | getCurrentYear() get Current Year Calendar cal = Calendar.getInstance(); cal.setTime(new Date()); return cal.get(Calendar.YEAR); |
Date | getCurrentYearFirst() get Current Year First Calendar today = Calendar.getInstance(); int yearPlus = Calendar.getInstance().get(Calendar.YEAR); today.set(yearPlus, 1, 1); return new Date(today.getTimeInMillis()); |
String | getCurrentYearMonth() get Current Year Month int year = getCurrentYear(); int month = getCurrentMonth(); String yearMonth = ""; if (month >= 10) { yearMonth = String.valueOf(year) + String.valueOf(month); } else { yearMonth = String.valueOf(year) + "0" + String.valueOf(month); return yearMonth; |
int[] | getCurrentYearMonthDay() get Current Year Month Day return getYearMonthDay(new Date()); |
int | getCurrYear() get Curr Year return new GregorianCalendar().get(Calendar.YEAR); |
Date | getCurrYearFirst() get Curr Year First Calendar currCal = Calendar.getInstance(); int currentYear = currCal.get(Calendar.YEAR); return getYearFirst(currentYear); |
Date | getLastDayOfCurrentYear() Return first day of current year Calendar cal = Calendar.getInstance();
cal.set(Calendar.MONTH, 11);
cal.set(Calendar.DAY_OF_MONTH, 31);
return cal.getTime();
|
int | getYear() get Year return getYear(now());
|