forked from sheetjs/sheetjs
		
	Fix fuzzydate string matching logic
This commit is contained in:
		
							parent
							
								
									5b67ac0806
								
							
						
					
					
						commit
						f6981076ec
					
				| @ -133,8 +133,8 @@ function fuzzydate(s/*:string*/)/*:Date*/ { | ||||
| 	if(y < 0 || y > 8099) return n; | ||||
| 	if((m > 0 || d > 1) && y != 101) return o; | ||||
| 	if(s.toLowerCase().match(/jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec/)) return o; | ||||
| 	if(s.match(/[^-0-9:,\/\\]/)) return o; | ||||
| 	return n; | ||||
| 	if(s.match(/[^-0-9:,\/\\]/)) return n; | ||||
| 	return o; | ||||
| } | ||||
| 
 | ||||
| var safe_split_regex = "abacaba".split(/(:?b)/i).length == 5; | ||||
|  | ||||
| @ -1600,8 +1600,8 @@ function fuzzydate(s/*:string*/)/*:Date*/ { | ||||
| 	if(y < 0 || y > 8099) return n; | ||||
| 	if((m > 0 || d > 1) && y != 101) return o; | ||||
| 	if(s.toLowerCase().match(/jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec/)) return o; | ||||
| 	if(s.match(/[^-0-9:,\/\\]/)) return o; | ||||
| 	return n; | ||||
| 	if(s.match(/[^-0-9:,\/\\]/)) return n; | ||||
| 	return o; | ||||
| } | ||||
| 
 | ||||
| var safe_split_regex = "abacaba".split(/(:?b)/i).length == 5; | ||||
|  | ||||
							
								
								
									
										4
									
								
								xlsx.js
									
									
									
									
									
								
							
							
								
								
								
								
								
									
									
								
							
						
						
									
										4
									
								
								xlsx.js
									
									
									
									
									
								
							| @ -1537,8 +1537,8 @@ function fuzzydate(s) { | ||||
| 	if(y < 0 || y > 8099) return n; | ||||
| 	if((m > 0 || d > 1) && y != 101) return o; | ||||
| 	if(s.toLowerCase().match(/jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec/)) return o; | ||||
| 	if(s.match(/[^-0-9:,\/\\]/)) return o; | ||||
| 	return n; | ||||
| 	if(s.match(/[^-0-9:,\/\\]/)) return n; | ||||
| 	return o; | ||||
| } | ||||
| 
 | ||||
| var safe_split_regex = "abacaba".split(/(:?b)/i).length == 5; | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user