A date converter which uses pattern based algorithm to convert ethiopian date to gregorian and vice versa
$ npm install ken.js --save
or
$ bower install ken.js --save
// using date object
var converter = new ken(new Date());
// or using plain string
var converter = new ken("2017-04-15");
converter.toEC().toString(); //output: "2009-08-07"
var converter = new ken("2009-08-07");
converter.toGC().toString(); //output: "2009-08-07"
//to get a javascript date object
converter.toGC().getDateInstance(); //output: converter.toGC().getDateInstance()
//add toEC to Date object
Date.prototype.toEC=function(){
return ken(this).toEC();
}
//then simply do
var today = new Date();
today.toEC().toString();
$ npm test > test-result.log 2>&1