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

https://github.com/azer/next-time

Returns the nearest date of given time
https://github.com/azer/next-time

Last synced: 11 months ago
JSON representation

Returns the nearest date of given time

Awesome Lists containing this project

README

          

## next-time

Returns the nearest date of given time

## Install

```bash
$ npm install next-time
```

## Usage

```js

now
// => 20:30

nextTime('23')
// => Date { Today 23:30 }

nextTime('11:09am')
// => Date { Today 11:09am }

nextTime('7:20pm')
// => Date { Tomorrow 7:20pm }
```

![](https://dl.dropboxusercontent.com/s/ctqwvswr8l2fn7m/npmel_26.jpg)