Skip to content

RFC: Human readable duration parsing for Timex.Duration #362

@cevn

Description

@cevn

Similar to Ruby's ChronicDuration gem, I need an elixir library that will support parsing natural language. Since Timex can output in a human readable format, it seems like it would make sense to be able to parse in such a way as well. Thoughts?

require 'chronic_duration'
=> true
>> ChronicDuration.parse('4 minutes and 30 seconds')
=> 270
>> ChronicDuration.parse('0 seconds')
=> nil
>> ChronicDuration.parse('0 seconds', :keep_zero => true)
=> 0

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions