Preheat your oven to 350°F (175°C). Grease a 9x5-inch loaf pan and set it aside.
In a medium bowl, whisk together the flour, baking soda, baking powder, cinnamon, nutmeg, and salt. Set this dry mixture aside.
In a large mixing bowl, cream the softened butter and granulated sugar together until the mixture is light and fluffy, about 3-4 minutes.
Add the eggs one at a time, mixing well after each addition. Then stir in the vanilla extract.
Gradually incorporate the dry ingredients into the wet mixture, mixing just until combined. Do not overmix; a few lumps are okay.
Fold the diced apples into the batter, ensuring they are evenly distributed. If using, gently fold in the chopped nuts.
Pour the batter into the prepared loaf pan, smoothing the top with a spatula.
Bake in the preheated oven for 55-65 minutes, or until a toothpick inserted in the center comes out clean.
Once baked, remove the bread from the oven and let it cool in the pan for about 10 minutes. Then transfer it to a wire rack to cool completely before slicing.