chronic_duration
chronic_duration copied to clipboard
parse(keep_zero: true) treats empty strings like 0
[50] pry(main)> ChronicDuration.parse(" ")
=> nil
[51] pry(main)> ChronicDuration.parse(" ", keep_zero: true)
=> 0
I believe that empty strings should still be treated as invalid and return nil. There is a difference between not entering anything and explicitly entering 0.
It also treats strings like "cow"
as 0