https://github.com/mastilver/is-now
check if the given time is the current time
https://github.com/mastilver/is-now
Last synced: about 1 year ago
JSON representation
check if the given time is the current time
- Host: GitHub
- URL: https://github.com/mastilver/is-now
- Owner: mastilver
- License: mit
- Created: 2015-08-17T12:13:53.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2016-12-23T13:00:28.000Z (over 9 years ago)
- Last Synced: 2025-06-05T13:03:18.852Z (about 1 year ago)
- Language: JavaScript
- Size: 3.91 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: readme.md
- License: license
Awesome Lists containing this project
README
# is-now [](https://travis-ci.org/mastilver/is-now)[](https://coveralls.io/github/mastilver/is-now?branch=master)
> compare times with the current time
## Install
```
$ npm install --save is-now
```
## Usage
```js
var isNow = require('is-now');
isNow(new Date());
// true
```
## API
### isNow(time)
#### input
*Required*
Type: `Date`, `moment`, `number`
The time to compare to the current time, if it's a number it must be a unix timestamp.
## License
MIT © [Thomas Sileghem](https://github.com/mastilver)