duration duration is JSR310 command line tool which converts ISO formatted date time string(and another format one) into duration string. Usage $ duration 2006-01-02T15:04:05.600+07:00 PT-127228H-52M-47.731606S parameters ISO8601 formatted datetime string