parse-relative-time

1.1.0 • Public • Published

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.

Readme

Keywords

none

Package Sidebar

Install

npm i parse-relative-time

Weekly Downloads

2

Version

1.1.0

License

MIT

Unpacked Size

28.9 kB

Total Files

20

Last publish

Collaborators

  • fczbkk