List of utility methods to do Year From
String | yearformMatDate(Date date) yearform Mat Date return sydf.format(date);
|
String | yearFromDate(String date) year From Date String dt = date.substring(0, 4);
return dt;
|
int | yearFromDateValue(long x) Get the year from a date value. return (int) (x >>> SHIFT_YEAR); |
int | yearFromFileName(String str) Filename Eg : en.13.3.1.2009.6.11 try { return Integer.parseInt(str.split("\\.")[4]); } catch (ArrayIndexOutOfBoundsException e) { return -1; |
int | yearOfDate(Date s) year Of Date String d = FORMAT_YYYY_MM_DD.format(s);
return Integer.parseInt(d.substring(0, 4));
|
int | yearsBetween(String from, String to) years Between return yearsBetween(from, to, "yyyyMMdd"); |