§ 62. Notice. 1. If the petition be to change the name of an infant, notice of the time and place when and where the petition will be presented must be served, in like manner as a notice of a motion upon an attorney in an action, upon (a) both parents of the infant, if they be living, unless the petition be made by one of the parents, in which case notice must be served upon the other, if he or she be living, and (b) the general guardian or guardian of the person, if there be one. But if any of the persons, required to be given notice by this section, reside without the state, then the notice required by this section must be sent by registered mail to the last known address of the person to be served. If it appears to the satisfaction of the court that a person required to be given notice by this section cannot be located with due diligence within the state, and that such person has no known address without the state, then the court may dispense with notice or require notice to be given to such persons and in such manner as the court thinks proper.
2. If the petition be to change the name of a person currently confined as an inmate in any correctional facility or currently under the supervision of the department of corrections and community supervision or a county probation department as a result of a conviction for a violent felony offense as defined in section 70.02 of the penal law or a felony defined in article one hundred twenty-five of such law or any of the following provisions of such law sections 130.25, 130.30, 130.40, 130.45, 255.25, 255.26, 255.27, article two hundred sixty-three, 135.10, 135.25, 230.05, 230.06, subdivision two of section 230.30 or 230.32, notice of the time and place when and where the petition will be presented shall be served, in like manner as a notice of a motion upon an attorney in an action, upon the district attorney of every county in which such person has been convicted of such felony and upon the court or courts in which the sentence for such felony was entered. Unless a shorter period of time is ordered by the court, said notice shall be served upon each such district attorney and court or courts not less than sixty days prior to the date on which such petition is noticed to be heard.