ilib
Version:
iLib is a cross-engine library of internationalization (i18n) classes written in pure JS
1 lines • 846 B
JavaScript
var MathUtils=require("./MathUtils.js"),Calendar=require("./Calendar.js"),EthiopicCal=function(options){this.type="ethiopic",options&&"function"==typeof options.onLoad&&options.onLoad(this)};EthiopicCal.prototype.getNumMonths=function(year){return 13},EthiopicCal.prototype.getMonLength=function(month,year){var m=month;switch(typeof m){case"string":m=parseInt(m,10);break;case"function":case"object":case"undefined":return 30}return m<13?30:this.isLeapYear(year)?6:5},EthiopicCal.prototype.isLeapYear=function(year){var y=year;switch(typeof y){case"string":y=parseInt(y,10);break;case"object":if("number"!=typeof y.year)return!1;y=y.year;break;case"function":case"undefined":return!1}return 3===MathUtils.mod(y,4)},EthiopicCal.prototype.getType=function(){return this.type},Calendar._constructors.ethiopic=EthiopicCal,module.exports=EthiopicCal;