ዘመን
zemen
Ethiopian ⇆ Gregorian dates for JavaScript
Convert between the two calendars and format dates with Amharic month and weekday names. Zero dependencies, TypeScript-ready, ~2 KB.
የኢትዮጵያ እና የግሪጎሪያን ቀን መቀያየሪያ እና መቅረጫ ላይብረሪ።
ዛሬ · today
…
Gregorian → Ethiopian
Ethiopian → Gregorian
Formatting
.format(pattern) renders a date with
Y M D d e E tokens — every other
character is copied through. Today, formatted:
Install & Use
$ npm install zemen # or: bun add zemen
import Zemen from 'zemen';
const zare = new Zemen(); // today, in the Ethiopian calendar
zare.format('MMMM DD ቀን YYYY E'); // 'ሐምሌ 04 ቀን 2018 ዓ.ም'
Zemen.fromGregorian('2017-09-02'); // Gregorian → Ethiopian
new Zemen('2009-12-27').toGregorian(); // Ethiopian → Gregorian