action. Generally, following the enactment of a statute of limitations which shortens a prior limitations period or provides one where one did not exist previously, a plaintiff whose cause of action arose prior to the date of enactment will be allowed a reasonable period of time in which to bring his action. (Mega v. Holy Cross Hospital (1986), 111 Ill. 2d 416, 420, 490 N.E.2d 665.) If under the new statute a reasonable time remains, the new period is applied, without more; but if a reasonable time does not remain, then one will be allowed. (Mega, 111 Ill. 2d at 420-21, 490 N.E.2d at 667.) What constitutes a reasonable time will depend on the facts of each case. Sakellariadis v. Spanos (1987), 163 Ill. App. 3d 1084, 1089, 517 N.E.2d 324.
Here, the Act became effective July 1, 1985. Plaintiff filed his declaratory judgment action on March 2, 1987. This was 20 months after the effective date of the Act and close to the two-year statute of limitations. It cannot be said that the 20-month delay in filing the action was reasonable.
Petitioner argues, however, that the child’s mother acknowledged that he was the father and voluntarily allowed him to visit the child until petitioner and the mother entered into an agreement on June 4, 1986, whereby petitioner agreed to not have any contact with the mother. Petitioner maintains that the time period which should be considered for purposes of whether there was a reasonable delay in his filing the instant suit was that period between June 4, 1986, and March 2, 1987, and that such period was reasonable. We are unpersuaded by this argument.
Petitioner had knowledge of his cause of action from the birth of the child. Although the child’s mother may have voluntarily allowed him to visit the child, petitioner was free to initiate an action whereby he could obtain legal recognition of his rights as the child’s father. Moreover, the agreement that he entered into with respondent only prohibited contact with respondent and does not address the issue of his visitation with his daughter, Emily. Consequently, he had no affirmative indication on June 4, 1986, that he would not be allowed to continue to visit his daughter. We conclude, therefore, that petitioner’s suggested reason for his delay in filing his suit, that he was allowed to visit the child without legal action, does not render the delay reasonable. This is particularly true where, as here, petitioner’s reason for the delay could have continued beyond the two-year statute of limitations which would have conclusively barred petitioner’s action. See Sakellariadis, 163 Ill. App. 3d at 1090, 517 N.E.2d at 328-29.
Even if the agreement did by its terms prohibit petitioner from visiting his daughter, the subsequent delay in filing the suit was not