Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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'
- Host: GitHub
- URL: https://github.com/vovanr/hour-to-day-or-night
- Owner: VovanR
- License: mit
- Created: 2016-09-08T13:29:22.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-07-09T11:18:15.000Z (over 6 years ago)
- Last Synced: 2024-12-28T13:17:40.930Z (about 1 month ago)
- Topics: utility, vovanr-service
- Language: HTML
- Homepage: https://vovanr.github.io/hour-to-day-or-night
- Size: 71.3 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# hour-to-day-or-night
[![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