https://github.com/bukinoshita/rnd-date
:date: Get a random date
https://github.com/bukinoshita/rnd-date
date javascript nodejs random
Last synced: 6 months ago
JSON representation
:date: Get a random date
- Host: GitHub
- URL: https://github.com/bukinoshita/rnd-date
- Owner: bukinoshita
- License: mit
- Created: 2017-02-27T16:32:06.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2023-01-04T21:50:11.000Z (almost 3 years ago)
- Last Synced: 2025-03-16T14:37:37.585Z (7 months ago)
- Topics: date, javascript, nodejs, random
- Language: JavaScript
- Homepage:
- Size: 426 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# rnd-date
> Get a random date
[](https://app.codeship.com/projects/204866)
[](https://travis-ci.org/bukinoshita/rnd-date)
[](https://www.npmjs.com/package/rnd-date)
[](https://raw.githubusercontent.com/bukinoshita/rnd-date/master/LICENSE)## Install
```bash
$ npm install --save rnd-date
```## Usage
```js
import rndDate from 'rnd-date'rndDate(2010, 2016)
// => 2015-04-18T07:29:04.989ZrndDate(2010, new Date())
// => 2012-06-29T07:51:26.924Z
```## API
### rnd-date(from, to)
#### from
Type: `Number`
Required#### to
Type: `Number`
Default: `new Date()`
Optional## Related
* [rnd-age](https://github.com/bukinoshita/rnd-age) — Generate a random age
## License
[MIT](https://github.com/bukinoshita/rnd-date/blob/master/LICENSE) © Bu Kinoshita