jquery-src/jquery.calendars.js
function(name, language) {
			name = (name || 'gregorian').toLowerCase();
			language = language || '';
			var cal = this._localCals[name + '-' + language];
			if (!cal && this.calendars[name]) {
				cal = new this.calendars[name](language);
				this._localCals[name + '-' + language] = cal;
			}
			if (!cal) {
				throw (this.local.invalidCalendar || this.regionalOptions[''].invalidCalendar).
					replace(/\{0\}/, name);
			}
			return cal;
		}
function(name, language) {
			name = (name || 'gregorian').toLowerCase();
			language = language || '';
			var cal = this._localCals[name + '-' + language];
			if (!cal && this.calendars[name]) {
				cal = new this.calendars[name](language);
				this._localCals[name + '-' + language] = cal;
			}
			if (!cal) {
				throw (this.local.invalidCalendar || this.regionalOptions[''].invalidCalendar).
					replace(/\{0\}/, name);
			}
			return cal;
		}
function ( name , language ) { name = ( name || 'gregorian' ) . toLowerCase ( ) ; language = language || '' ; var cal = this . _localCals [ name + '-' + language ] ; if ( ! cal && this . calendars [ name ] ) { cal = new this . calendars [ name ] ( language ) ; this . _localCals [ name + '-' + language ] = cal ; } if ( ! cal ) { throw ( this . local . invalidCalendar || this . regionalOptions [ '' ] . invalidCalendar ) . replace ( / \{0\} / , name ) ; } return cal ; }
Obtain a calendar implementation and localisation.
@memberof Calendars
@param [name='gregorian'] {string} The name of the calendar, e.g. 'gregorian', 'persian', 'islamic'.
@param [language=''] {string} The language code to use for localisation (default is English).
@return {Calendar} The calendar and localisation.
@throws Error if calendar not found.
Obtain a calendar implementation and localisation .