UNPKG

india-holiday-1.0

Version:

A simple utility to check Indian holidays by date. Get festive greetings based on the current or given date.

53 lines (32 loc) โ€ข 1.5 kB
# IndiaHoliday-npmPackage ## ๐Ÿ“ฆ [india-holiday-1.0 Package on NPM](https://www.npmjs.com/package/india-holiday-1.0) A simple package to get information about Indian holidays. Whether you're planning your vacation or checking today's holiday, this package has you covered! --- ## ๐ŸŽฅ Inspiration This package was built with the help of **Web Dev Simplified**. Check out the tutorial I followed: [Web Dev Simplified - YouTube](https://www.youtube.com/watch?v=J4b_T-qH3BY&t=249s) --- ## ๐Ÿš€ Installation To install the package, simply run the following command: ```bash npm install india-holiday-1.0 ``` --- ## ๐Ÿ› ๏ธ Usage Once installed, you can use this package in your Node.js project to check for holidays. Hereโ€™s a quick example: ```javascript const getHolidayMessage = require('india-holiday-1.0'); // Replace with your package name // Test with a holiday date console.log(getHolidayMessage('2024-01-26', true)); // Should return "Happy Republic Day," // Test with a non-holiday date console.log(getHolidayMessage(new Date(), true)); // Should return "Welcome," console.log(getHolidayMessage('false' , true)); // Should return Error, ``` --- ## ๐Ÿ’ป Features - Get today's holiday in India. - Check if today is a holiday. - Easy to use and integrate with your Node.js projects. - Get color Gradient of India Flag. --- ## Made with โค๏ธ by [Sanskar](https://sanskarjaiswal2904.github.io/Sanskar-Website/index.html)