FOR YORKIES AND SMALLER BREEDS-
I would try not to leave your little one in a crate for longer than 6 hours if it can be avoided. Their bladders are much smaller and their metabolisms are much higher. Even if they're not active while you're gone, their body is going to produce waste faster than a larger breed adult would. Therefore, taking this into consideration, I wouldn't and don't leave my Yorkies in their crates for longer than this if at all avoidable.
At night, of course they can hold it, but their body is at rest and while I try to sleep 9 hours, they're tighter than ticks come morning!