I got an input field where the user inputs a date, currently I'm using Chronic and the user likes it.
If the user enters last jan
using Chronic and strftime I get January 2013
which is good, the issue comes when:
the user input is an upcoming month like January, the parsing I'm doing returns January 2014 and not January 2013 wich is what the user wants.
result_date = Chronic.parse(params[:date]).strftime('%B %Y')
Is there a way that I can set as default the current year? So when the user puts January it is parsed to January 2013 ?
Thanks!