Class DurationTypeHandler

java.lang.Object
ch.tocco.nice2.types.spi.TypeHandlerWrapper<Long>
ch.tocco.nice2.types.impl.handlers.DurationTypeHandler
All Implemented Interfaces:
TypeHandler<Long>

public class DurationTypeHandler extends TypeHandlerWrapper<Long>
String syntax: Either just an amount of millis or: TODO Change syntax to require hours:minutes:seconds in input, and always output at least these parts. Only the leftmost input value (hours) may overflow, eg 48:30:59 but not 8:61:00 in asObject(). Atm a value like "8:30" is mm:ss which is misleading depending on context. This change is for disambiguation, and is in compliance with the types.DurationUtil. Also, the input must allow negative values (minus sign in front of the whole string).

 [[<days>d]<hours>:]<minutes>:<seconds>[.<millis>]