ruby-duration icon indicating copy to clipboard operation
ruby-duration copied to clipboard

Doesn't fully support actual ISO8601 Duration format

Open lacostenycoder opened this issue 5 years ago • 0 comments

Duration has years months, days, hours, minutes, seconds. So why not support all of these?

irb(main):004:0>  d = Duration.new('P3Y6M4DT12H30M5S')
=> #<Duration:0x007fdb4ea67df0 @seconds=5, @negative=false, @total=110766605, @weeks=183, @days=1, @hours=0, @minutes=30>
irb(main):005:0> d.iso8601
=> "P1282DT30M5S"

Shouldn't the output return the same format as the input?

lacostenycoder avatar Mar 10 '19 10:03 lacostenycoder