henrypoydar / chronic_duration

A simple Ruby natural language parser for elapsed time
MIT License
351 stars 68 forks source link

Add :keep_zero option to ::parse and ::output #13

Closed pdf closed 11 years ago

pdf commented 12 years ago

Since zero is not nil, and having to check for nil (or zero) everywhere is wasteful, I've added an option to allow both ChronicDuration::parse and ChronicDuration::output to return zero values. Fixes #3.

pdf commented 12 years ago

FYI, the test suite was not passing for me out of master, so I've not added any additional specs, and I've not confirmed the specs pass. Happy to do so if you tell me how to run your tests.

henrypoydar commented 11 years ago

Sorry, refactored after a long hiatus so can't auto-merge. Feel free to submit again - hopefully the latest changes will help get your specs passing. Thanks!