greeting-time

1.0.0 • Public • Published

greeting-time

Get a greeting by the time of day

Install

$ npm install greeting-time

Usage

const greetingTime = require("greeting-time");
 
greetingTime(new Date()); // Good morning, Good afternoon, or Good evening

Notes

  • "Morning" is from 5am until noon
  • "Afternoon" is from noon until 5pm
  • "Evening" is from 5pm until 5am

I didn't include "Night" because "Good night" doesn't feel like a greeting. It conveys more of a farewell, which isn't the intent of the greeting-time module.

License

MIT © Elijah Manor

Readme

Keywords

none

Package Sidebar

Install

npm i greeting-time

Weekly Downloads

816

Version

1.0.0

License

MIT

Unpacked Size

2.5 kB

Total Files

5

Last publish

Collaborators

  • elijahmanor