Tenant Notice Period in Periodic Occupation Contract

For a contractual periodic occupation contract, can I include a term requiring the tenant to give two months' notice to vacate instead of four weeks? Is that legally enforceable?

Note: LandlordAid, our AI assistant, answered this question. We have left the response close to the original, except for grammar and minor formatting changes. You can find more details here.