Sha256: 42d3d3fca2cf0053db7b7a9b44fea258d2487b022b9a26b6586899be805e2b2b

Contents?: true

Size: 551 Bytes

Versions: 2

Compression:

Stored size: 551 Bytes

Contents

# Cogsworth: Natural Language Time Parser for Ruby

An attempt to make a natural language time parser for Ruby so you can convert from something like "1 hour 20 min" to value in seconds, and vice versa.

The name of this gem is derived from *Cogsworth*, the character from Beauty and the Beast, who is a clock. Get it?

## Usage

    Cogsworth.parse('2 hours 30 minutes') => 9000

    Cogsworth.unparse(142510) => '1d 15h 35m 10s'
    
## Acceptable Formats

    '2 days 1 hour 35 minutes 25 seconds'
    '2days 1hr 35min 25sec'
    '2d1h35m25s'
    

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
cogsworth-1.0.1 README.md
cogsworth-1.0.0 README.md