In any action or proceeding brought under the provisions of this chapter wherein all or part of the relief granted is divorce or annulment of a marriage any interlocutory or final judgment or decree shall contain, as a part thereof, the social security numbers of the named parties in the action or proceeding, as well as a provision that each party may resume the use of his or her premarriage surname or any other former surname.
N.Y. Dom. Rel.Law § 240-A