jquery-src/jquery.calendars.mayan.js
function(years) {
			years = years.split('.');
			if (years.length < 3) {
				throw 'Invalid Mayan year';
			}
			var year = 0;
			for (var i = 0; i < years.length; i++) {
				var y = parseInt(years[i], 10);
				if (Math.abs(y) > 19 || (i > 0 && y < 0)) {
					throw 'Invalid Mayan year';
				}
				year = year * 20 + y;
			}
			return year;
		}
function(years) {
			years = years.split('.');
			if (years.length < 3) {
				throw 'Invalid Mayan year';
			}
			var year = 0;
			for (var i = 0; i < years.length; i++) {
				var y = parseInt(years[i], 10);
				if (Math.abs(y) > 19 || (i > 0 && y < 0)) {
					throw 'Invalid Mayan year';
				}
				year = year * 20 + y;
			}
			return year;
		}
function ( years ) { years = years . split ( '.' ) ; if ( years . length < 3 ) { throw 'Invalid Mayan year' ; } var year = 0 ; for ( var i = 0 ; i < years . length ; i ++ ) { var y = parseInt ( years [ i ] , 10 ) ; if ( Math . abs ( y ) > 19 || ( i > 0 && y < 0 ) ) { throw 'Invalid Mayan year' ; } year = year * 20 + y ; } return year ; }
Convert from the formatted year back to a single number.
@memberof MayanCalendar
@param years {string} The year as n.n.n.
@return {number} The sequential year.
@throws Error if an invalid value is supplied.
Convert from the formatted year back to a single number .