microformat-shiv.js
function (arr, format) {
			var out = new modules.ISODate(),
				i = 0,
				value = '';

			// if the fragment already contains a full date just return it once
			if(arr[0].toUpperCase().match('T')) {
				return new modules.ISODate(arr[0], format);
			}else{
				for(i = 0; i < arr.length; i++) {
					value = arr[i];

					// date pattern
					if( value.charAt(4) === '-' && out.hasFullDate() === false ){
						out.parseDate(value);
					}

					// time pattern
					if( (value.indexOf(':') > -1 || modules.utils.isNumber( this.parseAmPmTime(value) )) && out.hasTime() === false ) {
						// split time and timezone
						var items = this.splitTimeAndZone(value);
						value = items[0];

						// parse any use of am/pm
						value = this.parseAmPmTime(value);
						out.parseTime(value);

						// parse any timezone
						if(items.length > 1){
							out.parseTimeZone(items[1], format);
						}
					}

					// timezone pattern
					if(value.charAt(0) === '-' || value.charAt(0) === '+' || value.toUpperCase() === 'Z') {
						if( out.hasTimeZone() === false ){
							out.parseTimeZone(value);
						}
					}

				}
				// alway imply minutes
				if(out.tM === -1){
					out.tM = '00';
				}
				return out;
			}
		}
function (arr, format) {
			var out = new modules.ISODate(),
				i = 0,
				value = '';

			// if the fragment already contains a full date just return it once
			if(arr[0].toUpperCase().match('T')) {
				return new modules.ISODate(arr[0], format);
			}else{
				for(i = 0; i < arr.length; i++) {
					value = arr[i];

					// date pattern
					if( value.charAt(4) === '-' && out.hasFullDate() === false ){
						out.parseDate(value);
					}

					// time pattern
					if( (value.indexOf(':') > -1 || modules.utils.isNumber( this.parseAmPmTime(value) )) && out.hasTime() === false ) {
						// split time and timezone
						var items = this.splitTimeAndZone(value);
						value = items[0];

						// parse any use of am/pm
						value = this.parseAmPmTime(value);
						out.parseTime(value);

						// parse any timezone
						if(items.length > 1){
							out.parseTimeZone(items[1], format);
						}
					}

					// timezone pattern
					if(value.charAt(0) === '-' || value.charAt(0) === '+' || value.toUpperCase() === 'Z') {
						if( out.hasTimeZone() === false ){
							out.parseTimeZone(value);
						}
					}

				}
				// alway imply minutes
				if(out.tM === -1){
					out.tM = '00';
				}
				return out;
			}
		}
function ( arr , format ) { var out = new modules . ISODate ( ) , i = 0 , value = '' ; // if the fragment already contains a full date just return it once if ( arr [ 0 ] . toUpperCase ( ) . match ( 'T' ) ) { return new modules . ISODate ( arr [ 0 ] , format ) ; } else { for ( i = 0 ; i < arr . length ; i ++ ) { value = arr [ i ] ; // date pattern if ( value . charAt ( 4 ) === '-' && out . hasFullDate ( ) === false ) { out . parseDate ( value ) ; } // time pattern if ( ( value . indexOf ( ':' ) > - 1 || modules . utils . isNumber ( this . parseAmPmTime ( value ) ) ) && out . hasTime ( ) === false ) { // split time and timezone var items = this . splitTimeAndZone ( value ) ; value = items [ 0 ] ; // parse any use of am/pm value = this . parseAmPmTime ( value ) ; out . parseTime ( value ) ; // parse any timezone if ( items . length > 1 ) { out . parseTimeZone ( items [ 1 ] , format ) ; } } // timezone pattern if ( value . charAt ( 0 ) === '-' || value . charAt ( 0 ) === '+' || value . toUpperCase ( ) === 'Z' ) { if ( out . hasTimeZone ( ) === false ) { out . parseTimeZone ( value ) ; } } } // alway imply minutes if ( out . tM === - 1 ) { out . tM = '00' ; } return out ; } }
concatenate an array of date and time text fragments to create an ISODate object
used for microformat value and value-title rules

@param  {Array} arr ( Array of Strings )
@param  {String} format ( Modules.ISODate profile format )
@return {Object} Modules.ISODate
concatenate an array of date and time text fragments to create an ISODate object used for microformat value and value - title rules