It is always worth giving your landlord as much notice as possible, but the actual notice requirement will depend on your rental agreement.