Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/mastilver/is-now

check if the given time is the current time
https://github.com/mastilver/is-now

Last synced: 5 days ago
JSON representation

check if the given time is the current time

Awesome Lists containing this project

README

        

# is-now [![Build Status](https://travis-ci.org/mastilver/is-now.svg?branch=master)](https://travis-ci.org/mastilver/is-now)[![Coverage Status](https://coveralls.io/repos/mastilver/is-now/badge.svg?branch=master&service=github)](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)