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