I have a php function (named 'weeks_in_month') that calculates and returns the number of weeks in a month (parameters: month,year). I want to use this functions result within the view i.e
$number_of_weeks_in_current_month = weeks_in_month($current_month_number, $current_year);
How can I go about this? Is a new controller needed for this? or is this a job for Service Injection? This views controller currently has the 1 function to return the view from a get request.
I will want to store globally used functions like these within a single file for future use