You've probably wondered if you really need to stop your car when the light turns yellow. Well, the answer may surprise you.

Throughout most of the country, the rule is pretty clear; if the light turns yellow you have to slow down and stop before it turns red. However, here in the Hudson Valley, some people claim that as long as they beat the red they can't get a ticket. So, who's to believe?

Well, we searched the New York traffic code to find out the answer, and the actual law may surprise many Hudson Valley Drivers.

We've all been in this precarious situation; you're driving down Route 9, Route 211 or some other busy road when you see the light has just turned yellow. Do you hit the brakes and stop, or do you just keep driving as the light switches between yellow and red?

Recently I was faced with that scenario when I decided it would be safer to just keep driving through the yellow. As we traveled through the intersection, my son caught the light turning red through the sunroof and yelled that I was breaking the law. He claimed that because we were in the intersection when the light was red, we were running a red light.

I confidently told him that no, he was mistaken. But in reality, I really didn't know what the law says when it comes to running a yellow. Later that day I decided to dig into the New York traffic code and found out that I was actually correct. It turns out that New York is very specific about their yellow light rule, and spells it out.

Traffic, except pedestrians, facing a steady circular yellow signal may enter the intersection;  however, said traffic is thereby warned that the related green movement is being terminated or that a red indication will be exhibited immediately thereafter.

So no, according to the law you do not have to slow down for a yellow light if you can safely get your car into the intersection before it turns red. As long as your car has broken the plane of the intersection before the light is red you have not broken the law and cannot get a ticket, even if it turns red before you've cleared it.

Of course, this doesn't mean you're allowed to speed up to beat those red lights, but you also don't have to slam on those brakes if your light suddenly turns yellow. It's important that all drivers are aware of this rule so that vehicle operators at all streets in an intersection know exactly what to expect when that light finally turns.

UP NEXT: See how much gasoline cost the year you started driving