Logo Lanfrica

tamiopia/qen.js

Domain:

natural language processing

Record type:

software
Creator:
tam
Host:
A utility package for Ethiopian date conversion, payment scheduling, and holiday checks. # qen.js πŸ‡ͺπŸ‡Ή A utility package for Ethiopian date conversion, payment scheduling, and holiday checks. ## Features - Convert between Ethiopian and Gregorian dates. - Generate payment schedules (e.g., monthly, quarterly). - Check Ethiopian public holidays. - Format dates in Amharic. - Calculate late fees for overdue payments. --- ## Installation Install `qen.js` using npm: ```bash npm install qen.js ``` --- ## Usage ### 1. Convert Gregorian to Ethiopian Date Convert a Gregorian date to an Ethiopian date. ```javascript const { EthiopianDate } = require('qen.js'); // Convert a Gregorian date to Ethiopian date const gregorianDate = new Date(2023, 9, 30); // October 30, 2023 const ethiopianDate = EthiopianDate.fromGregorian(gregorianDate); console.log(ethiopianDate.format('YYYY-MM-DD')); // Output: 2015-02-20 console.log(ethiopianDate.formatAmharic()); // Output: 20 α‹¨αŠ«α‰²α‰΅ 2015 ``` **Response:** ```bash 2015-02-20 20 α‹¨αŠ«α‰²α‰΅ 2015 ``` --- ### 2. Generate a Payment Schedule Generate a payment schedule for a given start date. ```javascript const startDate = new EthiopianDate(2015, 2, 20); // 20 Yekatit 2015 const schedule = startDate.generatePaymentSchedule(1, 12); // Monthly payments for 1 year console.log('Payment Schedule:'); schedule.forEach((date, index) => { console.log(`Payment ${index + 1}: ${date.formatAmharic()}`); }); ``` **Response:** ```bash Payment Schedule: Payment 1: 20 α‹¨αŠ«α‰²α‰΅ 2015 Payment 2: 20 αˆ˜αŒ‹α‰’α‰΅ 2015 Payment 3: 20 αˆšα‹«α‹α‹« 2015 Payment 4: 20 αŒαŠ•α‰¦α‰΅ 2015 Payment 5: 20 αˆ°αŠ” 2015 Payment 6: 20 αˆ€αˆαˆŒ 2015 Payment 7: 20 αŠ–αˆ€αˆ° 2015 Payment 8: 20 α“αŒ©αˆ˜ 2015 Payment 9: 20 መሳክረም 2016 Payment 10: 20 αŒ₯α‹…αˆα‰΅ 2016 Payment 11: 20 αˆ…α‹³αˆ­ 2016 Payment 12: 20 α‰³α‹αˆ³αˆ΅ 2016 ``` --- ### 3. Check if a Date is a Holiday Check if a specific date is an Ethiopian public holiday. ```javascript const isHoliday = EthiopianDate.isHoliday(2015, 1, 1); // Ethiopian New Year console.log(isHoliday); // Output: Ethiopian New Year ``` **Response:** ```bash Ethiopian New Year ``` --- ### 4. Cal …

Languages