rem: return null; 
add: return false; 
context: 	dojo.forEach(match, function(v, i){		if(!i){return;}		var token=tokens[i-1];		var l=token.length;		switch(token.charAt(0)){			case 'y':				if(l != 2){					//interpret year literally, so '5' would be 5 A.D.					result.setFullYear(v);					expected.year = v;				}else{					if(v<100){						v = Number(v);						//choose century to apply, according to a sliding window						//of 80 years before and 20 years after present year						var year = '' + new Date().getFullYear();						var century = year.substring(0, 2) * 100;						var yearPart = Number(year.substring(2, 4));						var cutoff = Math.min(yearPart + 20, 99);						var num = (v < cutoff) ? century + v : century - 100 + v;						result.setFullYear(num);						expected.year = num;					}else{						//we expected 2 digits and got more...						if(options.strict){							return null;						}						//interpret literally, so '150' would be 150 A.D.						//also tolerate '1950', if 'yyyy' input passed to 'yy' format						result.setFullYear(v);						expected.year = v;					}				}				break;			case 'M':				if(l>2){					var months = bundle['months-format-' + widthList[l-3]].concat();					if(!options.strict){						//Tolerate abbreviating period in month part						//Case-insensitive comparison						v = v.replace(".","").toLowerCase();						months = dojo.map(months, function(s){ return s.replace(".","").toLowerCase(); } );					}					v = dojo.indexOf(months, v);					if(v == -1){//						console.debug("dojo.date.locale.parse: Could not parse month name: '" + v + "'.");						return null;					}				}else{					v--;				}				result.setMonth(v);				expected.month = v;				break;			case 'E':			case 'e':				var days = bundle['days-format-' + widthList[l-3]].concat();				if(!options.strict){					//Case-insensitive comparison					v = v.toLowerCase();					days = dojo.map(days, "".toLowerCase);				}				v = dojo.indexOf(days, v);				if(v == -1){//					console.debug("dojo.date.locale.parse: Could not parse weekday name: '" + v + "'.");					return null;				}				//TODO: not sure what to actually do with this input,				//in terms of setting something on the Date obj...?				//without more context, can't affect the actual date				//TODO: just validate?				break;			case 'd':				result.setDate(v);				expected.date = v;				break;			case 'D':				//FIXME: need to defer this until after the year is set for leap-year?				result.setMonth(0);				result.setDate(v);				break;			case 'a': //am/pm				var am = options.am || bundle.am;				var pm = options.pm || bundle.pm;				if(!options.strict){					var period = /\./g;					v = v.replace(period,'').toLowerCase();					am = am.replace(period,'').toLowerCase();					pm = pm.replace(period,'').toLowerCase();				}				if(options.strict && v != am && v != pm){//					console.debug("dojo.date.locale.parse: Could not parse am/pm part.");					return null;				}				// we might not have seen the hours field yet, so store the state and apply hour change later				amPm = (v == pm) ? 'p' : (v == am) ? 'a' : '';				break;			case 'K': //hour (1-24)				if(v==24){v=0;}				// fallthrough...			case 'h': //hour (1-12)			case 'H': //hour (0-23)			case 'k': //hour (0-11)				//TODO: strict bounds checking, padding				if(v > 23){//					console.debug("dojo.date.locale.parse: Illegal hours value");					return null;				}				//in the 12-hour case, adjusting for am/pm requires the 'a' part				//which could come before or after the hour, so we will adjust later				result.setHours(v);				break;			case 'm': //minutes				result.setMinutes(v);				break;			case 's': //seconds				result.setSeconds(v);				break;			case 'S': //milliseconds				result.setMilliseconds(v);//				break;//			case 'w'://TODO				var firstDay = 0;//			default://TODO: throw?//				console.debug("dojo.date.locale.parse: unsupported pattern char=" + token.charAt(0));		}	});
meta: 4497	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/4497/aa2673ad763e60a623e4898eddd3e799f9c03416/locale.js/clean/date/locale.js