juration
juration copied to clipboard
A natural language duration parser/stringifier written in javascript
Usage: ```javascript const juration = require('juration'); juration.locale('tr-TR'); juration.stringify(160); ``` ``` Result: 2 dk 40 san ```
Why not milliseconds? :(
Changed the parsing in order to handle M as a pattern for months and m as a pattern for minutes. Added tests to validate that the parsing is done correctly....
Allows the parser to assume a certain unit if no units were specified in the input string.
I use the micro format to parse back and forth. The months and minutes both use m as unit which causes issues when parsing the dates. I would like to...
E.g. `1:30` now parses to 31, should be 90.
Hi, Could you please create an 'official' release for 0.0.1? Then I can point to a real version when using bower :-) Thanks!
``` javascript var juration = require("juration"); console.log(juration.stringify(0.2)); ``` prints an empty string instead of "0.2 secs". Related to #13.
Allows the parser to assume a certain unit if no units were specified in the input string. For example, in my case, I want to display 48h still in hours...