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

@surafiel/ethiopian-date-picker

v1.0.0

Published

Complete Ethiopian calendar date picker component with Amharic support

Downloads

8

Readme

Ethiopian Date Picker (የኢትዮጵያ ቀን መምረጫ)

A modern, lightweight, and accurate Ethiopian Date Picker component with full Amharic support. Built with ease of use and design in mind.

Ethiopian Date Picker Preview

Features

  • 📅 Full Ethiopian Calendar Support: Accurate conversion logic between Gregorian and Ethiopian calendars.
  • 🇪🇹 Amharic Localization: Native support for Amharic month names and weekdays.
  • 🎨 Beautiful UI: Modern, clean, and responsive design with smooth animations.
  • 🛠 Zero Dependencies: Built with vanilla JavaScript and CSS (developed with Vite).
  • 📦 Dual Build: Supports both ESM (import) and UMD (<script>) usage.
  • 🌗 Dark Mode Ready: Styles are easily customizable.

Installation

You can install the package via npm (if published):

npm install @surafiel/ethiopian-date-picker

Or install directly from GitHub (Recommended if not on npm):

npm install github:surafielbeyene41/EthiopianDateConverter

Or download the latest release from the GitHub repository.

Usage

1. Using ES Modules (React, Vue, etc.)

Import the styles and the component in your JavaScript/TypeScript file:

import { EthiopianDatePicker, EthiopianDateConverter } from 'ethiopian-date-picker';
import 'ethiopian-date-picker/dist/style.css'; // Don't forget the CSS!

// Initialize the picker
const picker = new EthiopianDatePicker('my-container-id', {
    placeholder: 'ቀን ይምረጡ', // "Select Date"
    onChange: (selectedDate) => {
        console.log('Selected Date:', selectedDate);
        // Output: { year: 2016, month: 1, day: 10 }
        
        // Convert to Gregorian if needed
        const greg = EthiopianDateConverter.toGregorian(
            selectedDate.year, 
            selectedDate.month, 
            selectedDate.day
        );
        console.log('Gregorian:', greg);
    }
});

2. Using in Browser (Script Tag)

Include the script and CSS in your HTML file:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Ethiopian Date Picker</title>
    <link rel="stylesheet" href="./dist/style.css">
</head>
<body>
    
    <div id="calendar-container"></div>

    <script src="./dist/ethiopian-date-picker.umd.cjs"></script>
    <script>
        // The library exposes 'EthiopianDatePicker' globally
        const picker = new EthiopianLib.EthiopianDatePicker('calendar-container', {
            onChange: function(date) {
                console.log(date);
            }
        });
    </script>
</body>
</html>

API Reference

EthiopianDatePicker

The main class for the UI component.

Constructor: new EthiopianDatePicker(containerId, options)

| Parameter | Type | Description | |-----------|------|-------------| | containerId | string | The ID of the HTML element to render the picker into. | | options | Object | Configuration object (see below). |

Options:

| Option | Type | Default | Description | |--------|------|---------|-------------| | placeholder | string | 'ማስገቢያ ቀን ይምረጡ' | Placeholder text for the input field. | | onChange | function | () => {} | Callback function triggered when a date is selected. Receives { year, month, day }. |

EthiopianDateConverter

Utility class for date conversions.

Methods:

  • toEthiopian(gregorianDate)

    • gregorianDate: Date object or date string.
    • Returns: { year, month, day } (Ethiopian)
  • toGregorian(ethiopianYear, ethiopianMonth, ethiopianDay)

    • Returns: { year, month, day } (Gregorian)
  • formatEthiopianDate(ethiopianDate, format)

    • ethiopianDate: { year, month, day }
    • format: 'full' (e.g., "10 መስከረም 2016") or 'short' (e.g., "10/1/2016")

Development

  1. Clone the repository:

    git clone https://github.com/surafielbeyene41/EthiopianDateConverter.git
  2. Install dependencies:

    npm install
  3. Start the development server:

    npm run dev
  4. Build for production:

    npm run build

License

This project is licensed under the MIT License.