Sensing pregnancy

Al
I've read about dogs/cats being able to sense pregnancy in their owners and how their mood can change whether they become more affectionate or may even become standoffish, etc. -- My question is.. How early can a dog/cat sense that their owner is pregnant?