@visimedia/part-of-day
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

Contributors Forks Stargazers Issues MIT License LinkedIn


Logo

Part of Day

A simple TS compatible library that returns either morning, afternoon or evening dependent on a given EPOCH time.
Explore the docs »

View Demo · Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contributing
  6. License
  7. Contact
  8. Acknowledgments

About The Project

Built With

  • Node
  • TypeScript

(back to top)

Getting Started

Part of Day is a dependency free typescript compatible module

Prerequisites

This is an example of how to list things you need to use the software and how to install them.

  • npm
    npm install npm@latest -g

Installation

  1. Install NPM package
    npm install @visimedia/part-of-day

(back to top)

Usage

Part of Day comes with 3 functions. get, getByHour and getNow. All functions return either MORNING, AFTERNOON or EVENING dependent on the time of day.

get consumes epoch time (in milliseconds)

get(epochTime)

getByHour consumes the hour of the day

getByHour(14)

getNow consumes no parameters and returns the current time of day

getNow()

(back to top)

Roadmap

  • [ ] More detailed configuration
  • [ ] Capitalisation control

See the open issues for a full list of proposed features (and known issues).

(back to top)

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

License

Distributed under the MIT License. See LICENSE.txt for more information.

(back to top)

Contact

VisiMedia - @VisiMedia - contact@visimedia.co.uk
Ben Lewis - @BenjiSoft - ben.lewis@visimedia.co.uk

Project Link: https://github.com/VisiSolutions/Part-of-Day

(back to top)

Package Sidebar

Install

npm i @visimedia/part-of-day

Weekly Downloads

4

Version

1.0.2

License

MIT

Unpacked Size

24.3 kB

Total Files

9

Last publish

Collaborators

  • benjisoft
  • visiben