Talk:Pokémon Egg

Is the gender of hatched pokemon determined for an egg, or is it being generated while the egg is hatchig?