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

ethiopian-date-picker-and-converter

v1.2.1

Published

A React component library for converting and picking Ethiopian dates.

Readme

Ethiopian Date Picker and Converter

The Ethiopian Date Picker and Converter is a React component library designed to assist anyone who needs to work with Ethiopian dates. Whether you're converting a date from the Gregorian calendar to the Ethiopian calendar or simply adding a date picker UI to your input fields, this library simplifies your development process.

Features

  • Convert Gregorian dates to Ethiopian dates.
  • User-friendly date picker UI for selecting Ethiopian dates.
  • Easy integration into your project.
  • TypeScript support
  • Modern styling with customizable themes
  • Handles leap years correctly
  • Proper date validation

Installation

You can install the package using npm:

npm install ethiopian-date-picker-and-converter

Or using yarn:

yarn add ethiopian-date-picker-and-converter

Usage

Date Picker Component

import React, { useState } from 'react';
import { EthiopianDatePicker } from 'ethiopian-date-picker-and-converter';
import 'ethiopian-date-picker-and-converter/dist/cjs/style.css';

const App = () => {
  const handleDateChange = (date: string) => {
    console.log("Selected Ethiopian date:", date);
  };

  return (
    <div>
      <h1>Ethiopian Date Picker Example</h1>
      <EthiopianDatePicker 
        id="date-picker" 
        placeholder="የቀን መምረጫ / Select Date" 
        onDateChange={handleDateChange} 
      />
    </div>
  );
};

export default App;

Date Conversion Utility

The library includes a dedicated utility file for date conversions. This utility provides functionality for converting Gregorian dates to Ethiopian dates with different return formats.

import { EthiopianDateConverter } from "ethiopian-date-picker-and-converter";

// Convert with default 'full' format
const fullDate = EthiopianDateConverter('2024-01-15');  // Returns: 'ሰኞ፣ ጥር 7 ቀን 2016 ዓ.ም.'

// Convert with 'date-only' format
const dateOnly = EthiopianDateConverter('2024-01-15', 'date-only');  // Returns: '2016-5-7'

// Convert with 'object' format
const dateObject = EthiopianDateConverter('2024-01-15', 'object');  
// Returns: {
//   year: 2016,
//   month: 5,
//   day: 7,
//   monthName: 'ጥር',
//   weekDay: 'ሰኞ'
// }

Date Conversion Utility Props

| Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | gregorianDate | string | Yes | - | Gregorian date in 'YYYY-MM-DD' format | | returnFormat | 'full' | 'date-only' | 'object' | No | 'full' | Format of the returned Ethiopian date |

Return Types

  • 'full': Returns a string with complete date in Amharic (e.g., 'ሰኞ፣ ጥር 7 ቀን 2016 ዓ.ም.')
  • 'date-only': Returns a string in 'YYYY-M-D' format
  • 'object': Returns an object with year, month, day, monthName, and weekDay properties

Props

EthiopianDatePicker Props

| Prop | Type | Required | Description | |------|------|----------|-------------| | id | string | Yes | Unique identifier for the input element | | placeholder | string | No | Placeholder text for the input | | onDateChange | (date: string) => void | Yes | Callback function when date is selected |

Development

To run the project locally:

  1. Clone the repository:

    git clone https://github.com/KingAbe1/et-calander-picker-and-converter.git
  2. Install dependencies:

    npm install
  3. Start Storybook:

    npm run storybook
  4. Build the library:

    npm run build

Contributing

Contributions are welcome! Please feel free to submit a pull request or open an issue for any bugs or feature requests.

License

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