VovanR / hour-to-day-or-night

Convert hour to day or night: 8 → 'day'
https://vovanr.github.io/hour-to-day-or-night
MIT License
1 stars 0 forks source link
utility vovanr-service

hour-to-day-or-night

<img align="right" width="120" height="120" src="./logo.svg" alt="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