Problem using custom function in widget view

I have a couple of custom functions in /components/Utility/Datetime.php for common date formatting that I need.

It works great in controllers, but I can’t get it to work in the view of a widget…

It comes up with the dreaded:

Call to undefined method DateTime::buildsessiondates()

I have tried putting the "use app\components\Utility\Datetime;" statement in the widget controller and the widget view file, but it makes not difference whatsoever…

help… please… my forehead it getting sore… :wacko:



Datetime and DateTime ? (t and T)

Ah! The wonder of another set of eyeballs looking over a problem… :)

Of course that raises another question…

In the filename and the class name they are both “Datetime” ( little ‘t’ ).

Why did Yii ( or php ) convert it to ‘T’…

I am wondering so I can try to avoid another head banging session… ;D

Thanks for your help.