Code Monkey home page Code Monkey logo

zemen's Introduction

Zemen

Ethiopian Calender library.

Under Development MIT

Build Status

Coverage Status

gzip

Based On Beyene-Kudlek Algorithm

Installation

$ npm install --save zemen  

Usage

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

  • More formating
  • Support the browser
  • 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

zemen's People

Contributors

akim95 avatar dependabot[bot] avatar eyuelberga avatar linosorice avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

zemen's Issues

Can you make it moment plugin

Hi bro,
can you make it momentjs plugin .... which is very popular datetime javascript library that works on both browser and node.js and different tools like calendar and date time pickers support.

The same JDN for different dates.

The ethiopicToJDN functions returns the same JDN for different dates. For example:

ethiopicToJDN(6, 13, 2000)  // = 2454721
ethiopicToJDN(1, 1, 2001)   // = 2454721

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.