I used to love fireworks as a kid. I was the one who used to buy fireworks and bottle rockets illegally from the big kid down the street and fire them off to my heart's content, never considering who or what I was disturbing.
Then I got a Yorkie, who is afraid of fireworks. Eddie escaped from a dogsitter on the Fourth of July when he was just a few months old. He wandered for 4 or 5 hours before returning home traumatized. I later tried to condition him to noises, but I've had only mild successes. While he no longer tries to bolt, he shakes and refuses to eat or drink and is miserable as long as they're going off. Other than that, he is a supremely confident 6-year-old dog.
I should add that firecrackers and larger exploding displays are legal in Alaska in a community 40 minutes away from where I live, a city of 300,000. So people routinely make the drive and load up. That's why Eddie was especially traumatized when he escaped as a pup. And this year, our city made all fireworks legal on private property from 9:30 p.m. to 1 a.m. It was horrible.
I would highly recommend that anyone who gets a pup to try to condition them to noises while they're young. Start small. Bang a pan in the yard and reward with a treat or distract with a toy. Then gradually increase the noises and the reward. If fear becomes an issue, back off to a softer noise. Take it from someone who failed their dog and didn't condition them to noises when he was young.
With Jillie, I knew what I was doing. I rewarded her for tolerating noises from the time she was 11 weeks old. Now, she has no problems with fireworks. It was worth the effort not to have two traumatized dogs last night.
Here's a video I found recently on youtube that discusses noise conditioning dogs.