UNPKG

ilib

Version:

iLib is a cross-engine library of internationalization (i18n) classes written in pure JS

1 lines 671 B
var MathUtils=require("./MathUtils.js"),Calendar=require("./Calendar.js"),GregorianCal=require("./GregorianCal.js"),ThaiSolarCal=function(options){this.type="thaisolar",options&&"function"==typeof options.onLoad&&options.onLoad(this)};ThaiSolarCal.prototype=new GregorianCal({noinstance:!0}),ThaiSolarCal.prototype.parent=GregorianCal,(ThaiSolarCal.prototype.constructor=ThaiSolarCal).prototype.isLeapYear=function(year){var year="number"==typeof year?year:year.getYears(),centuries=MathUtils.mod(year-=543,400);return 0===MathUtils.mod(year,4)&&100!==centuries&&200!==centuries&&300!==centuries},Calendar._constructors.thaisolar=ThaiSolarCal,module.exports=ThaiSolarCal;