Convert hour to day or night: 8 → 'day'
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
example
public
.editorconfig
.gitattributes
.gitignore
.mversionrc
.travis.yml
CHANGELOG.md
LICENSE
README.md
index.js
logo.svg
package.json
test.js

README.md

hour-to-day-or-night

Hour to Day or Night logo

Commitizen friendly XO code style

NPM version Build Status Coveralls Status Dependency Status DevDependency Status

Convert hour to day or night: 8 → 'day'

Demo: vovanr.github.io/hour-to-day-or-night

Install

npm install --save hour-to-day-or-night

Usage

var hourToDayOrNight = require('hour-to-day-or-night');

hourToDayOrNight(8);
//=> 'day'

hourToDayOrNight(19);
//=> 'night'

API

hourToDayOrNight(hour)

Returns day or night.

hour

Type: number

From 0 to 23.

License

MIT © Vladimir Rodkin