Maybe a very silly question, but I couldn't find the method that gets the value (as long or Date) from a TimeItem. DateItem has getValueAsDate() method, what is the equivalence for TimeItem. Do you expect user to use DateTimeFormat to parse the TimeItem value string?
Something like:
TimeItem itemItem = new TimeItem();
timeItem.setTimeFormatter(TimeDisplayFormat.TOSHORTTIME);
DateTimeFormat formatter = DateTimeFormat.getFormat("h:m a");
Date time = formatter.parse(timeItem.getValueAsString());
Another question, TimeDisplayFormat.TOSHORTTIME does not print space between h:m and am/pm. Is this a bug?
Thanks for your help.
Something like:
TimeItem itemItem = new TimeItem();
timeItem.setTimeFormatter(TimeDisplayFormat.TOSHORTTIME);
DateTimeFormat formatter = DateTimeFormat.getFormat("h:m a");
Date time = formatter.parse(timeItem.getValueAsString());
Another question, TimeDisplayFormat.TOSHORTTIME does not print space between h:m and am/pm. Is this a bug?
Thanks for your help.
Comment