List of utility methods to do Year Get
Integer | calcDifferenceAsYears(Calendar aBaseDate, Calendar aTargetDate) calc Difference As Years if (aBaseDate.getTimeInMillis() > aTargetDate.getTimeInMillis()) { return -1 * calcDifferenceAsYearsPrivate(aTargetDate, aBaseDate); } else { return calcDifferenceAsYearsPrivate(aBaseDate, aTargetDate); |
Integer | currentYear() current Year return Integer.parseInt(yyyy.format(new Date())); |
String | currentYear() current Year formatter = new SimpleDateFormat("yyyy"); return formatter.format(new Date()); |
String | currentYearStr() current Year Str return getTimeForMormat(new Date(), FORMAT_YEAR); |
String | getBeforeYear() get Before Year String currentYear = getFormatCurrentTime("yyyy"); int beforeYear = Integer.parseInt(currentYear) - 1; return "" + beforeYear; |
Date | getBeginningOfYear() get Beginning Of Year return getBeginningOfYear(null);
|
String | getCalendarYearString(Calendar date) returns day from a calendar date return justYear.format(date.getTime());
|
int | getCurrentYear() get Current Year return getYear(new Date()); |
int | getCurrentYearAsInt() get Current Year As Int return CURRENT_YEAR_AS_INT;
|
int | getCurrYearFirst() get Curr Year First SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd"); Calendar ca = Calendar.getInstance(); int FirstYear = ca.get(Calendar.YEAR); return FirstYear; |