Including helpers in controller is not a best way. I think its better move all this calendar logic in separate class in libs instead of mess in controller/herlper