Nep-cron is an npm package that allows you to schedule tasks based on Nepali dates and times, while also considering the Nepal time zone (Asia/Kathmandu). It includes a Nepali date to English date conversion feature for scheduling tasks using the popular "node-cron-tz" library.
- Schedule jobs based on Nepali dates and times in the Asia/Kathmandu time zone.
You can install the Nepali Date Scheduler package using npm:
npm install nep-cron
Here's an example of how to use the Nepali Date Scheduler in your Node.js application:
const { NepaliScheduler } = require('nep-cron');
const scheduler = new NepaliScheduler();
scheduler.scheduleNepaliDateJob('2079-07-15', '14:30', () => {
console.log('Job is scheduled according to Nepali date and time in Nepal time zone.');
});
This code schedules a job for the Nepali date '2079-07-15' at 14:30 in the Asia/Kathmandu time zone.
Note: Make sure the date is in YYYY-MM-DD Format.
This package relies on 2 packages:
- node-cron-tz for scheduling job.
- nepali-date-converter for converting date.
Contributions to the Nep-cron are welcome! If you would like to contribute, please follow these guidelines:
- Fork the repository.
- Create a new branch for your feature or bug fix.
- Make your changes and write tests if applicable.
- Ensure all tests pass.
- Create a pull request to the main repository.
This package is distributed under the ISC License. Feel free to use and modify it as needed.
If you have any questions, issues, or suggestions, you can contact us at whois@poudel-aayush.com.np
Happy scheduling in Nepali dates and times!