npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

qen.js

v1.0.1

Published

A utility package for Ethiopian date conversion, payment scheduling, and holiday checks.

Readme

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:

npm install qen.js

Usage

1. Convert Gregorian to Ethiopian Date

Convert a Gregorian date to an Ethiopian date.

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:

2015-02-20
20 የካቲት 2015

2. Generate a Payment Schedule

Generate a payment schedule for a given start date.

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:

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.

const isHoliday = EthiopianDate.isHoliday(2015, 1, 1); // Ethiopian New Year
console.log(isHoliday); // Output: Ethiopian New Year

Response:

Ethiopian New Year

4. Calculate Late Fees

Calculate late fees for overdue payments.

const dueDate = new EthiopianDate(2015, 2, 20); // 20 Yekatit 2015
const paymentDate = new EthiopianDate(2015, 2, 25); // Payment made on 25 Yekatit 2015

const lateFee = dueDate.calculateLateFee(dueDate, paymentDate, 10); // ETB 10 per day
console.log(`Late Fee: ETB ${lateFee}`); // Output: Late Fee: ETB 50

Response:

Late Fee: ETB 50

5. Get the Current Ethiopian Date and Time

Get the current Ethiopian date and time.

const currentDateTime = EthiopianDate.getCurrentDateTimeInEthiopia();
console.log('Current Date:', currentDateTime.date.formatAmharic());
console.log('Current Time:', currentDateTime.time); // 12-hour format

Response (example):

Current Date: 14 የካቲት 2015
Current Time: 2:30 PM

Use Cases

  1. Rental Management Systems

    • Generate payment schedules for tenants using the Ethiopian calendar.
    • Calculate late fees for overdue payments.
    • Display due dates in Amharic for better user experience.
  2. Subscription Services

    • Manage subscription renewals and billing cycles in the Ethiopian calendar.
    • Notify users of upcoming payments in their local date format.
  3. Event Planning

    • Schedule events and check for Ethiopian public holidays.
    • Avoid scheduling events on holidays or adjust dates accordingly.
  4. Financial Applications

    • Calculate interest or penalties based on Ethiopian dates.
    • Generate reports with dates formatted in Amharic.
  5. E-commerce Platforms

    • Display order delivery dates in the Ethiopian calendar.
    • Manage promotions and discounts tied to Ethiopian holidays.

Contributing

Contributions are welcome! If you have any ideas or suggestions, please open an issue or submit a pull request on GitHub.

To contribute:

  1. Fork the repository.
  2. Create a new branch.
  3. Make your changes and commit them.
  4. Open a pull request.

License

This project is licensed under the MIT License. See the LICENSE file for details.