arnau / ISO8601

Ruby parser to work with ISO8601 dateTimes and durations — http://en.wikipedia.org/wiki/ISO_8601
MIT License
75 stars 15 forks source link

Duration regex pattern doesn't always allow for weeks #73

Closed osose-e closed 2 years ago

osose-e commented 2 years ago

https://github.com/arnau/ISO8601/blob/7d93f9983f7911796d84e5c03110e6c355bec505/lib/iso8601/duration.rb#L238

The"|" in the line above prevents this valid ISO Duration string "P3W6DT1H2M3S" from being parsed.