# 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](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Human readable format of relative time

**Examples**

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

Returns **(null | [number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/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](https://github.com/fczbkk/parse-relative-time/issues) or send me an e-mail at <a href="mailto:riki@fczbkk.com">riki@fczbkk.com</a>.

## License

parseRelativeTime is published under the [MIT license](https://github.com/fczbkk/parse-relative-time/blob/master/LICENSE).
