However, the specific name you are referring to in "il mio onomastico" will determine whether it is masculine or feminine. For example:
* Il mio onomastico è il 25 aprile (My name day is April 25th) - This is the name day of Marco, which is masculine.
* Il mio onomastico è il 15 agosto (My name day is August 15th) - This is the name day of Maria, which is feminine.
So, while the phrase itself doesn't change, the context will reveal the gender of the name day being celebrated.