Simple--look up "rule 11140."
That's what NASDAQ refers you to when you ask them directly. Sure, you can read the SEC's explanation, but it's confusing and needs to be rewritten: it's almost as if they intend a grey area rather than a clear ruling. Anyway, this is about as clear as gets (bold and italic my emphasis):
"UPC Rule 11140 governs the
designation of ex-dates for
securities. The ex-date is the date
on or after which a security is
traded without a specific dividend or
distribution. The payable date is the
date that the dividend is sent to the
record owner of the security."
That part in italics? That's telling you NOT to sell before the ex-date if you want the divvie, split, whatever. In other words, you might be on the company's books, but if anybody along the line screwed up in filing paperwork, then the ex-date may indeed be different than what the company hopes.
And ex-date is "king."