A man who went on a stabbing rampage at a Toronto office after being told he would lose his job will undergo a psychiatric assessment for another month.

Chuang Li is charged with three counts of attempted murder, four counts of aggravated assault, and four counts of assault with a weapon.

A Toronto court granted a 30-day extension on Thursday of a psychiatric assessment a judge ordered in May which was set to wrap up on Friday.

Li's lawyer told the court the doctor conducting the assessment on the 47-year-old man from Mississauga, Ont., had requested the extension.

Police have said Li was in the process of being fired when he started stabbing some of his superiors and other employees on April 9.

Four people were taken to hospital, one of them with life-threatening injuries.

The case returns to court July 21.