Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/vovanr/hour-to-day-or-night

Convert hour to day or night: 8 → 'day'
https://github.com/vovanr/hour-to-day-or-night

utility vovanr-service

Last synced: 3 days ago
JSON representation

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

Awesome Lists containing this project

README

        

# hour-to-day-or-night

Hour to Day or Night logo

[![Commitizen friendly][commitizen-image]][commitizen-url]
[![XO code style][codestyle-image]][codestyle-url]

[![NPM version][npm-image]][npm-url]
[![Build Status][travis-image]][travis-url]
[![Coveralls Status][coveralls-image]][coveralls-url]
[![Dependency Status][depstat-image]][depstat-url]
[![DevDependency Status][depstat-dev-image]][depstat-dev-url]

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

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

## Install

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

## Usage

```js
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](https://github.com/VovanR)

[demo]: https://vovanr.github.io/hour-to-day-or-night

[commitizen-url]: https://commitizen.github.io/cz-cli/
[commitizen-image]: https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?style=flat-square

[codestyle-url]: https://github.com/xojs/xo
[codestyle-image]: https://img.shields.io/badge/code_style-XO-5ed9c7.svg?style=flat-square

[npm-url]: https://npmjs.org/package/hour-to-day-or-night
[npm-image]: https://img.shields.io/npm/v/hour-to-day-or-night.svg?style=flat-square

[travis-url]: https://travis-ci.org/VovanR/hour-to-day-or-night
[travis-image]: https://img.shields.io/travis/VovanR/hour-to-day-or-night.svg?style=flat-square

[coveralls-url]: https://coveralls.io/r/VovanR/hour-to-day-or-night
[coveralls-image]: https://img.shields.io/coveralls/VovanR/hour-to-day-or-night.svg?style=flat-square

[depstat-url]: https://david-dm.org/VovanR/hour-to-day-or-night
[depstat-image]: https://david-dm.org/VovanR/hour-to-day-or-night.svg?style=flat-square

[depstat-dev-url]: https://david-dm.org/VovanR/hour-to-day-or-night
[depstat-dev-image]: https://david-dm.org/VovanR/hour-to-day-or-night/dev-status.svg?style=flat-square