1.1.0 • Published 6 years ago

parse-relative-time v1.1.0

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

parseRelativeTime

Parse simple relative time in human readable format to milliseconds.

Documentation

parseRelativeTime

Parse simple relative time in human readable format to milliseconds.

Parameters

  • input string Human readable format of relative time

Examples

parseRelativeTime('2 days');  // --> 172800000
parseRelativeTime('-2 days');
parseRelativeTime('in 2 days');
parseRelativeTime('2 days ago');

Returns (null | number)

Bug reports, feature requests and contact

If you found any bugs, if you have feature requests or any questions, please, either file an issue at GitHub or send me an e-mail at riki@fczbkk.com.

License

parseRelativeTime is published under the MIT license.