Fixed month parsing for dates

Had to subtract 1 from the month because January is 0.