bitwalker / bitwalker/timex

RFC: Human readable duration parsing for Timex.Duration

Open
#362 4 comments 1 reaction 0 assignees View on GitHub
feature/enhancement level:advanced
Dominant language
Elixir
Stars
1.8k
Forks
407
PR merge metrics
No merged PRs in 30d

Description

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?

```ruby
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
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.