@visimedia/part-of-day
v1.0.2
Published
A simple TS compatible library that returns either morning, afternoon or evening dependent on a given EPOCH time.
Downloads
35
Readme
About The Project
Built With
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
- Install NPM package
npm install @visimedia/part-of-day
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()
Roadmap
- [ ] More detailed configuration
- [ ] Capitalisation control
See the open issues for a full list of proposed features (and known issues).
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!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
License
Distributed under the MIT License. See LICENSE.txt
for more information.
Contact
VisiMedia - @VisiMedia - [email protected]
Ben Lewis - @BenjiSoft - [email protected]
Project Link: https://github.com/VisiSolutions/Part-of-Day