I am trying to find some more examples about the difference between l'an/l'année and I am now confused. For example, I want to find out whether to use l'an/l'année in "I got pregnant the same year I got married." in French. Google Translates says "Je suis tombée enceinte la même année de mon mariage." and another translation software called DeepL says "Je suis tombée enceinte l'année de mon mariage."
Are these sentences correct? If so, why do we use année instead of an? Because I am very convinced an/année indicates a particular point of time here. Thanks for answering.