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

yeha-days

v1.0.3

Published

An elegant conversion utility between Geez and Gregorian Calendars

Readme

yeha-days 🗓️

An elegant and lightweight TypeScript utility for converting between the Geez (Ethiopian) and Gregorian calendars.

yeha-days provides a familiar, Date-like API for the Geez calendar, making it easy to handle dates, perform conversions, and manage Geez-specific conventions without the headache of manual calculations.

✨ Features

  • Bidirectional Conversion: Seamlessly convert between Geez and Gregorian calendars.
  • GeezDate Class: A familiar API that mimics the native JavaScript Date object for the Geez calendar.
  • Ethiopic Names: Built-in support for Geez month and weekday names.
  • Flexible Parsing: Parse Geez dates from strings or create them from specific components.
  • Lightweight: Zero external dependencies.
  • Type Safe: Written in TypeScript with full type definitions.

🚀 Getting Started

Installation

npm install yeha-days
# or
bun add yeha-days

🛠 Usage

Using the GeezDate Class

The GeezDate class is the easiest way to work with Geez dates. It behaves much like the standard Date object.

import { GeezDate } from "yeha-days";

// Get the current Geez date (defaults to now)
const today = new GeezDate();
console.log(today.getFullYear()); // 2018 (Geez Year)
console.log(today.getMonth()); // 9 (Geez Month)
console.log(today.getDate()); // 26 (Geez Date)
console.log(today.getDayName()); // "ረቡዕ" (Wednesday)
console.log(today.getMonthName()); // "ግንቦት"
console.log(today.toString()); // "ረቡዕ ግንቦት 26 2018 10:30:0"

// Create a specific Geez date (Year, Month, Date)
const historicDate = new GeezDate(2014, 12, 30);
console.log(historicDate.getDayName()); // "ሰንበት" (Sunday)

// Parse a Geez date string (YYYY-MM-DD HH:mm:ss)
const parsedDate = new GeezDate("2014-12-30 12:30");

Using the CustomDate Class

CustomDate extends the native JavaScript Date object, providing the full Gregorian API but with added support for Ethiopian-style weekday names.

import { CustomDate } from "yeha-days";

const date = new CustomDate();
console.log(date.getFullYear()); // Native year (e.g., 2026)
console.log(date.getDayName()); // Day name in English (e.g., "Wednesday")

The geez_to_gregorian utility function returns a CustomDate instance, allowing you to use native date methods immediately after conversion.

High-level Conversions

For quick conversions, use the standalone utility functions. They provide a simple way to transition between calendars without manually managing objects.

Gregorian to Geez

import { gregorian_to_geez } from "yeha-days";

// Returns a GeezDate object
const geez = gregorian_to_geez(2026, 6, 3);
console.log(geez.toString()); // "ረቡዕ ግንቦት 26 2018 ..."

Geez to Gregorian

import { geez_to_gregorian } from "yeha-days";

// Returns a CustomDate object (extends native Date)
const gregorian = geez_to_gregorian(2018, 9, 26);
console.log(gregorian.toDateString()); // "Wed Jun 03 2026"

📖 Key Concepts

Month Numbering

Months in the Geez calendar are 1-indexed (1 to 13), where 13 is the Pagumē month.

String Parsing

The GeezDate constructor supports ISO-like strings in the format YYYY-MM-DD HH:mm:ss.

📜 License

MIT © AbyiH 🇪🇹