calander solving problem with Ruby