This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function excelToSimpleDateFormat(date, str) { | |
var excelNonReserved = /([^(m+|d+|y+|am\/pm|a\/p|h+|s+|0+|\[h+\]|\[m+\]|\[s+\])])/gi; | |
var excelElements = /("[^"]+"|m+|d+|y+|am\/pm|a\/p|h+|s+|0+|\[h+\]|\[m+\]|\[s+\])/gi; | |
var restrictedChars = /[a-z]+/gi; | |
var quotes = /"([^"]+)"/; | |
var minute = /m/g; | |
var month = /M/g; | |
var hour = /h/gi; | |
var seconds = /s/gi; | |
var ampm = /(a\/p|am\/pm)/gi; |