List of usage examples for org.joda.time Days parseDays
@FromString public static Days parseDays(String periodStr)
Days
by parsing a string in the ISO8601 format 'PnD'. From source file:griffon.plugins.jodatime.editors.DaysPropertyEditor.java
License:Apache License
private void handleAsString(String str) { if (isBlank(str)) { super.setValueInternal(null); return;//from w w w .j a v a2 s. c o m } try { super.setValueInternal(parse(Integer.parseInt(str))); return; } catch (NumberFormatException nfe) { // ignore } try { super.setValueInternal(Days.parseDays(str)); } catch (IllegalArgumentException e) { throw illegalValue(str, Days.class, e); } }