In release 0.12 OdfTableCell.getTimeValue() will return a Calendar object representing a time longer than 24 hours just fine.
The current master branch however getTimeValue() will log SEVERE: Text 'PT26H33M12.13S' could not be parsed: Invalid value for HourOfDay (valid values 0 - 23): 26 and return null
Neither version will write a time over 24 hours
Calendar cal = Calendar.getInstance();
cal.add(Calendar.HOUR, 26);
fcell.setTimeValue(cal)
Will result in a cell with value PT02H00M00S visible to the user as 2 hours.
I have code for new getDurationValue and setDurationValue methods (for Java 8 Duration); using that would also fix the regression in getTimeValue()
But what about setTimeValue? I feel the 0.12 behaviour is wrong and should be fixed, but people may now expect this behaviour and the method is now deprecated anyway.
Let me know if you'd like a PR for supporting Duration and whether the PR should change the behaviour of setTimeValue or not.
In release 0.12
OdfTableCell.getTimeValue()will return a Calendar object representing a time longer than 24 hours just fine.The current master branch however
getTimeValue()will log SEVERE: Text 'PT26H33M12.13S' could not be parsed: Invalid value for HourOfDay (valid values 0 - 23): 26 and returnnullNeither version will write a time over 24 hours
Will result in a cell with value
PT02H00M00Svisible to the user as 2 hours.I have code for new
getDurationValueandsetDurationValuemethods (for Java 8 Duration); using that would also fix the regression ingetTimeValue()But what about
setTimeValue? I feel the 0.12 behaviour is wrong and should be fixed, but people may now expect this behaviour and the method is now deprecated anyway.Let me know if you'd like a PR for supporting Duration and whether the PR should change the behaviour of
setTimeValueor not.