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

@kashumaku/ethio-calendar

v1.0.4

Published

An Ethiopian Calendar library for JavaScript and TypeScript that provides reliable conversion between the Ethiopian and Gregorian calendars, date formatting, validation, and common calendar utilities. Built for developers who need to work with Ethiopian d

Readme

Ethiopian Calendar

A lightweight TypeScript/JavaScript utility for converting between the Gregorian calendar and the Ethiopian calendar, with support for Ethiopian date formatting in English and Amharic.

Repository

The source code, documentation, and issue tracker are available on GitHub.

GitHub Repository

Features

  • Gregorian → Ethiopian date conversion
  • Ethiopian → Gregorian date conversion
  • Get today's Ethiopian date
  • Ethiopian leap-year detection
  • Ethiopian date validation
  • Ethiopian date formatting
  • English month names
  • Amharic month names
  • English and Amharic weekday names
  • Zero runtime dependencies
  • TypeScript support
  • Works with JavaScript, TypeScript, React, React Native, and Expo

Installation

npm

npm install @kashumaku/ethio-calendar

Yarn

yarn add @kashumaku/ethio-calendar

Usage

Gregorian to Ethiopian

import { gregorianToEthiopian } from "@kashumaku/ethio-calendar"

const date = new Date(2026, 7, 12)

const ethiopianDate = gregorianToEthiopian(date)

console.log(ethiopianDate)

Result:

{
  year: 2018,
  month: 12,
  day: 5
}

The returned object has the following structure:

interface EthiopianDate {
  year: number
  month: number
  day: number
}

Ethiopian to Gregorian

import { ethiopianToGregorian } from "@kashumaku/ethio-calendar"

const date = ethiopianToGregorian(
  2018,
  12,
  5,
)

console.log(date)

The result is a native JavaScript Date object.


Get Today's Ethiopian Date

import { todayEthiopian } from "@kashumaku/ethio-calendar"

const today = todayEthiopian()

console.log(today)

Example:

{
  year: 2018,
  month: 12,
  day: 5
}

Formatting

The formatEthiopian() function can convert a JavaScript Date or an EthiopianDate into a formatted Ethiopian date.

import { formatEthiopian } from "@kashumaku/ethio-calendar"

const date = new Date()

console.log(
  formatEthiopian(date)
)

Default format:

Sene 5, 2018

Short Format

formatEthiopian(
  new Date(),
  "short",
)

Example:

05/12/2018

Medium Format

formatEthiopian(
  new Date(),
  "medium",
)

Example:

Sene 5, 2018

Long Format

formatEthiopian(
  new Date(),
  "long",
)

Example:

Wednesday, Sene 5, 2018

Amharic Formatting

Pass "am" as the locale.

import { formatEthiopian } from "@kashumaku/ethio-calendar"

const formatted = formatEthiopian(
  new Date(),
  "medium",
  "am",
)

console.log(formatted)

Example:

ሰኔ 5, 2018

Long format:

formatEthiopian(
  new Date(),
  "long",
  "am",
)

Example:

ረቡዕ, ሰኔ 5, 2018

Ethiopian Months

The Ethiopian calendar has 13 months.

| # | English | Amharic | | -: | -------- | ------- | | 1 | Meskerem | መስከረም | | 2 | Tikimt | ጥቅምት | | 3 | Hidar | ኅዳር | | 4 | Tahsas | ታኅሣሥ | | 5 | Tir | ጥር | | 6 | Yekatit | የካቲት | | 7 | Megabit | መጋቢት | | 8 | Miyazya | ሚያዝያ | | 9 | Ginbot | ግንቦት | | 10 | Sene | ሰኔ | | 11 | Hamle | ሐምሌ | | 12 | Nehase | ነሐሴ | | 13 | Pagume | ጳጉሜን |

The month constants are also exported:

import {
  ETHIOPIAN_MONTHS_EN,
  ETHIOPIAN_MONTHS_AM,
} from "@kashumaku/ethio-calendar"

console.log(ETHIOPIAN_MONTHS_EN)
console.log(ETHIOPIAN_MONTHS_AM)

Ethiopian Leap Years

You can check whether an Ethiopian year is a leap year:

import { isEthiopianLeapYear } from "@kashumaku/ethio-calendar"

const result = isEthiopianLeapYear(2015)

console.log(result)

Returns:

true

Pagume normally has 5 days and has 6 days in a leap year.


Date Validation

Validate an Ethiopian date before converting it:

import {
  isValidEthiopianDate,
} from "@kashumaku/ethio-calendar"

const valid = isValidEthiopianDate(
  2018,
  13,
  5,
)

console.log(valid)

Returns:

true

An invalid date:

const valid = isValidEthiopianDate(
  2018,
  13,
  6,
)

console.log(valid)

Returns:

false

React Native / Expo

This package does not depend on Node.js or browser-specific APIs, so it can be used directly in React Native and Expo applications.

import { Text } from "react-native"
import { formatEthiopian } from "@kashumaku/ethio-calendar"

export function EthiopianDate() {
  return (
    <Text>
      {formatEthiopian(
        new Date(),
        "long",
        "am",
      )}
    </Text>
  )
}

TypeScript

The package includes TypeScript declarations.

You can import the EthiopianDate type:

import type {
  EthiopianDate,
} from "@kashumaku/ethio-calendar"

const date: EthiopianDate = {
  year: 2018,
  month: 12,
  day: 5,
}

API

gregorianToEthiopian(date)

Converts a JavaScript Date to an Ethiopian date.

gregorianToEthiopian(
  date: Date,
): EthiopianDate

ethiopianToGregorian(year, month, day)

Converts an Ethiopian date to a JavaScript Date.

ethiopianToGregorian(
  year: number,
  month: number,
  day: number,
): Date

todayEthiopian()

Returns today's Ethiopian date.

todayEthiopian(): EthiopianDate

formatEthiopian(date, format, locale)

Formats a Gregorian Date or Ethiopian date.

formatEthiopian(
  date?: Date | EthiopianDate,
  format?: "short" | "medium" | "long",
  locale?: "en" | "am",
): string

isEthiopianLeapYear(year)

Checks whether an Ethiopian year is a leap year.

isEthiopianLeapYear(
  year: number,
): boolean

isValidEthiopianDate(year, month, day)

Checks whether an Ethiopian date is valid.

isValidEthiopianDate(
  year: number,
  month: number,
  day: number,
): boolean

Zero Dependencies

This package has zero runtime dependencies.

It uses only native JavaScript/TypeScript functionality, making it suitable for:

  • Web applications
  • Node.js applications
  • React applications
  • React Native applications
  • Expo applications

Contributing

Contributions are welcome.

If you find a bug, have a feature request, or want to improve the package, please open an issue or submit a pull request on the GitHub repository.


License

MIT License

Copyright (c) 2026

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files, to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.