ilib
Version:
iLib is a cross-engine library of internationalization (i18n) classes written in pure JS
1 lines • 965 B
JavaScript
var ilib=require("./ilib.js");var Utils=require("./Utils.js");var MathUtils=require("./MathUtils.js");var Calendar=require("./Calendar.js");var EthiopicCal=function(){this.type="ethiopic"};EthiopicCal.prototype.getNumMonths=function(e){return 13};EthiopicCal.prototype.getMonLength=function(e,t){var r=e;switch(typeof r){case"string":r=parseInt(r,10);break;case"function":case"object":case"undefined":return 30;break}if(r<13){return 30}else{return this.isLeapYear(t)?6:5}};EthiopicCal.prototype.isLeapYear=function(e){var t=e;switch(typeof t){case"string":t=parseInt(t,10);break;case"object":if(typeof t.year!=="number"){return false}t=t.year;break;case"function":case"undefined":return false;break}return MathUtils.mod(t,4)===3};EthiopicCal.prototype.getType=function(){return this.type};EthiopicCal.prototype.newDateInstance=function(e){var t=require("./EthiopicDate.js");return new t(e)};Calendar._constructors["ethiopic"]=EthiopicCal;module.exports=EthiopicCal;