It's because your javascript timestamp variable is only the time in this format "11:52 AM" but you're trying to split it by a comma, which there isn't one, then you're trying to get a year, month, and day out of that but there isn't one. In order for your function to work correctly your...