The time based configuration properties of containers and beans support plain english, such as:
For convenience it is possible to specify a compound form, such as:
Spaces are also optional between the number and the time unit, which can be nice when using the abbreviated forms:
Abbreviations are accepted as follows:
if (u.equalsIgnoreCase("NANOSECONDS")) return TimeUnit.NANOSECONDS;
if (u.equalsIgnoreCase("NANOSECOND")) return TimeUnit.NANOSECONDS;
if (u.equalsIgnoreCase("NANOS")) return TimeUnit.NANOSECONDS;
if (u.equalsIgnoreCase("NANO")) return TimeUnit.NANOSECONDS;
if (u.equalsIgnoreCase("NS")) return TimeUnit.NANOSECONDS;
if (u.equalsIgnoreCase("MICROSECONDS")) return TimeUnit.MICROSECONDS;
if (u.equalsIgnoreCase("MICROSECOND")) return TimeUnit.MICROSECONDS;
if (u.equalsIgnoreCase("MICROS")) return TimeUnit.MICROSECONDS;
if (u.equalsIgnoreCase("MICRO")) return TimeUnit.MICROSECONDS;
if (u.equalsIgnoreCase("MILLISECONDS")) return TimeUnit.MILLISECONDS;
if (u.equalsIgnoreCase("MILLISECOND")) return TimeUnit.MILLISECONDS;
if (u.equalsIgnoreCase("MILLIS")) return TimeUnit.MILLISECONDS;
if (u.equalsIgnoreCase("MILLI")) return TimeUnit.MILLISECONDS;
if (u.equalsIgnoreCase("MS")) return TimeUnit.MILLISECONDS;
if (u.equalsIgnoreCase("SECONDS")) return TimeUnit.SECONDS;
if (u.equalsIgnoreCase("SECOND")) return TimeUnit.SECONDS;
if (u.equalsIgnoreCase("SEC")) return TimeUnit.SECONDS;
if (u.equalsIgnoreCase("S")) return TimeUnit.SECONDS;
if (u.equalsIgnoreCase("MINUTES")) return TimeUnit.MINUTES;
if (u.equalsIgnoreCase("MINUTE")) return TimeUnit.MINUTES;
if (u.equalsIgnoreCase("MIN")) return TimeUnit.MINUTES;
if (u.equalsIgnoreCase("M")) return TimeUnit.MINUTES;
if (u.equalsIgnoreCase("HOURS")) return TimeUnit.HOURS;
if (u.equalsIgnoreCase("HOUR")) return TimeUnit.HOURS;
if (u.equalsIgnoreCase("HRS")) return TimeUnit.HOURS;
if (u.equalsIgnoreCase("HR")) return TimeUnit.HOURS;
if (u.equalsIgnoreCase("H")) return TimeUnit.HOURS;
if (u.equalsIgnoreCase("DAYS")) return TimeUnit.DAYS;
if (u.equalsIgnoreCase("DAY")) return TimeUnit.DAYS;
if (u.equalsIgnoreCase("D")) return TimeUnit.DAYS;