Human readable interval parser and human-readable generator for Node.js/the Browser.
Heavily inspired by matthewmueller/date.
var humanizedInterval = ;;
More sophisticated examples
humanizedInterval understands all of the following examples:
; // 60000; // 90000; // 273600000; // 273636000; // "5 seconds"; // "1.5 minutes"
The full list
Humanized Interval supports the following units
months-- assumes 30 days
years-- assumes 365 days
Humanized Interval supports numbers up to ten being written out in English. If you want to extend it, you can do so by adding more keys to the language map. Alternatively you could add support for alternative languages.
var humanizedInterval = ;humanizedIntervallanguageMap'one-hundred' = 100// Adds support for the following:// returns 150000