Is 2 weeks a legal requirement in some states? I have yet to see that here in California, except once in an employment contract for a company headquartered in NJ.
The advice I generally give is also Golden Rule based, which is to give the amount of notice one reasonably believes would be given in a layoff. This is, of course, easiest with a company that has already gone through such a thing, having already set an expectation.