Its for both actually - which creates a few odd situations. (For example, its sometimes quicker for a tenant to wait until the lease expiry date and give 21 days notice to leave).
Also, a tenant can leave without penalty anytime between the expiry date and the vacate date of the notice of...