http://revach.net/article.php?id=3346

Section: Taryag Mitzvos   Category: Minchas Chinuch
Parshas Bo: Minchas Chinuch - When You Become Bar Mitzva In Broad Daylight

If a child turns thirteen years old on Rosh Chodesh Nisan and on the thirtieth day of Adar he witnesses the new moon may he testify together with another witness regarding the new moon? Although a Katan is not a valid witness, however if Bais Din accepts his testimony and makes that day into Rosh Chodesh it will turn out that he was a Gadol retroactively from the previous night and he was a Gadol at the time of the testimony. On the other hand maybe since at the time that he came to Bais Din he is still a Katan the Bais Din may not accept his testimony.

The Minchas Chinuch says that it is the choice of Bais Din to decide if they want to accept the testimony. They are not obligated to accept the testimony since he is still a Katan at the time that he comes to Bais Din, however if they choose to do so they may accept the testimony because upon the acceptance of the testimony he will be a Gadol retroactively from the previous night.

Nevertheless Bais Din only has the option of accepting the testimony if he saw the new moon after nightfall on the thirtieth day of Adar, but if he witnesses the new moon before nightfall on the twenty ninth day of Adar, they may not accept his testimony, since at the time that he saw the new moon he was a Katan. If a witness was not a Gadol at the time that he saw the testimony, he may not testify even though he is a Gadol at the time that he came to Bais Din.