List of utility methods to do Date to Year
int | getYear(Date date) Retrieve a year of a full date Calendar calendar = new GregorianCalendar(); calendar.setTime(date); int year = calendar.get(Calendar.YEAR); return year; |
int | getYear(Date date) get Year return newCalendar(date).get(Calendar.YEAR);
|
int | getYear(Date date) get Year Calendar calendar = Calendar.getInstance();
calendar.setTime(date);
return calendar.get(1);
|
int | getYear(Date date) Returns a int value indicating the year.
return parseDateToCalendar(date).get(Calendar.YEAR);
|
Integer | getYear(Date date) get Year Calendar c = getCalendar();
c.setTime(date);
return c.get(Calendar.YEAR);
|
int | getYear(Date dateParam) get Year if (dateParam == null) { throw new IllegalArgumentException("The dateParam must not be null"); Calendar cal = Calendar.getInstance(); cal.setTimeInMillis(dateParam.getTime()); return cal.get(Calendar.YEAR); |
int | getYear(Date start) get Year Calendar c = Calendar.getInstance(); c.setTime(start); Calendar now = Calendar.getInstance(); int count = 0; for (;;) { c.add(Calendar.YEAR, 1); count++; if (c.after(now)) { ... |
int | getYear(final Date date) Returns the calendar year given a date final GregorianCalendar c = gregorianCalendarThreadLocal.get(); c.setTime(date); return c.get(Calendar.YEAR); |
int | getYear(final Date date) get Year final Calendar calendar = GregorianCalendar.getInstance(); calendar.clear(); calendar.setTime(date); return calendar.get(Calendar.YEAR); |
int | getYear(final Date date) Get the year by given date. return getNumberOfGranularity(Calendar.YEAR, date);
|