When I go to work, I'll take my dog outside to do her business, but after that I usually can leave her for 8+ hours until I get home. Every once in awhile she won't be able to hold it until I get home, so I might find a present on the kitchen floor. But that's usually if she isn't feeling well; a few weeks ago she was pretty sick and even when I come home for lunch, she'd have left me a gift. My cat is fine for longer periods of time. Although he'll give me an earful if it's after 6 and he still hasn't gotten his supper (even if he has some dry food still in his dish).
However if I'm going away for a few days, I either bring them along (like if I'm going to my parent's over the Thanksgiving / Christmas season), or I get a friend to come in and check on them each day.
I also got a home security system installed, less to protect the house from break-ins (my little 200-lbs. mastiff is enough of a deterrent) but more because the fire alarms are connected to the system, so if the smoke alarms go off, the security company will dispatch the fire dept. and call me so I can rush home and check on my pets. (My ex-roommate helped "test" this out by burning stuff on the stove and then not turning off the alarms before the firetrucks were called out to my home).
I think it also depends on the animal... Some are more independent than others. I had an uncle (whose wife was a stay-at-home mother) that had a very dependent / needy dog. The dog would whine any time everyone left the house, and would act up clawing furniture etc. if they were gone for even an hour. They once had to take him to the vet when they got home from going out to eat, since he had tore open the inside of his mouth trying to chew through a baby-gate that they had put up to keep him from going into the basement. When I was going to college near their home, they'd sometimes hire me to "doggy-sit" if they wanted to go out in the evening, even though the dog shoud've been fine being alone for a couple of hours.
As for the legalities, that is solely based on the state (and even city) that you live in. I'm sure most places have some type of laws that dictate how long of an absence is deemed animal neglect (or if not a set time-frame, then other conditions like lack of water, feces on the floor, etc. where it becomes criminal neglect / abuse).