Under New Zealand law, a by-election cannot be held within six months of a general election so if Harawira had resigned later than 28 May then the by-election would not have occurred.
Under New Zealand law, a by-election will not be held if there will be a general election within the next six months and 75% of MPs agree not to hold the by-election. So if Harawira had resigned later than 28 May then the by-election would not have occurred.