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?
Duration has years months, days, hours, minutes, seconds. So why not support all of these?
Shouldn't the output return the same format as the input?