Skip to content
Returns the nearest date of given time
JavaScript
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
.gitignore
.npmignore
README.md
index.js
package.json
test.js

README.md

next-time

Returns the nearest date of given time

Install

$ npm install next-time

Usage

now
// => 20:30

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

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

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

Something went wrong with that request. Please try again.