A date can be formatted using a e.g. SimpleDateFormat(formatPattern, locale). Is it somehow possible to determine the time period (in seconds) that is represented by formatPattern given a date? E.g. if we have
Date date = new Date(1286488800);
String formatPattern = "yyyy";
is it possible to determine the length of the year (in seconds) represented by formatPattern and in which date lies?