Fixed the incorrect dates due to me forgetting that Javascript doesn't zero index the dates consistently.