Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/m3hari/zemen
Ethiopian to Gregorian date conversion javascript implementation - የ ኢትዮጵያ ቀን መቁጠሪያ
https://github.com/m3hari/zemen
calander date ethiopian javascript jdn
Last synced: 2 months ago
JSON representation
Ethiopian to Gregorian date conversion javascript implementation - የ ኢትዮጵያ ቀን መቁጠሪያ
- Host: GitHub
- URL: https://github.com/m3hari/zemen
- Owner: m3hari
- License: mit
- Created: 2017-08-16T14:58:22.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2023-11-28T01:09:11.000Z (about 1 year ago)
- Last Synced: 2024-10-25T06:27:10.663Z (2 months ago)
- Topics: calander, date, ethiopian, javascript, jdn
- Language: JavaScript
- Homepage:
- Size: 857 KB
- Stars: 23
- Watchers: 4
- Forks: 10
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Zemen
### Ethiopian Calender library.![Under Development](https://img.shields.io/badge/under-development-orange.svg)
[![MIT](https://img.shields.io/packagist/l/doctrine/orm.svg?maxAge=2592000)](LICENCE.md)[![Build Status](https://travis-ci.org/m3hari/zemen.svg?branch=master)](https://travis-ci.org/m3hari/zemen)
[![Coverage Status](https://coveralls.io/repos/github/m3hari/zemen/badge.svg?branch=develop)](https://coveralls.io/github/m3hari/zemen?branch=master)
[![gzip](https://img.badgesize.io/m3hari/zemen/master/dist/zemen.min.js?compression=gzip)](https://img.badgesize.io/m3hari/zemen/master/dist/zemen.min.js?compression=gzip)
### Based On Beyene-Kudlek Algorithm
#### http://www.geez.org/Calendars/## Installation
```bash
$ npm install --save zemen
```## Usage
```js
const Zemen = require('zemen');let zare = new Zemen();
zare.toString() // '2009-12-27'
zare.format('MMM-DD-YYYY') // ነሐሴ-27-2009
zare.format('d ፣ MMM DD ቀን YYYY E') // ቅዳሜ ፣ ነሐሴ 27 ቀን 2009 ዓ.ም// TO Ethiopian
Zemen.toEC("2017-09-02").toString() // '2009-12-27'
Zemen.toEC(2017,8,2).toString() // '2009-12-17'
Zemen.toEC(new Date()).toString() // '2009-12-27'// TO Gregorian
Zemen.toGC("2009-12-27").toDateString() // Sat Sep 02 2017
Zemen.toGC(2009,11,27).toDateString() // Sat Sep 02 2017
Zemen.toGC(new Zemen()).toDateString() // Sat Sep 02 2017```
### Plans
- [x] More formating
- [x] Support the browser
- [x] Publish on npm
- [ ] playground github page
- [ ] Date picker
- [ ] Date utilities
- [ ] vue,angular,react wrapper## Contributing
1. Fork it!
2. Create your feature branch
3. Submit a pull request :D