Changing year, month etc., to ints