deleted console.log and improved date parsing
better detection