[Solved] Get last 6 months from in Jquery


Javascript style for this piece of code (jQuery not required) :

var now = new Date();
var sixMonthsFromNow = new Date(now.setMonth(now.getMonth() - 6));
var sortByQueryString = 
    '&fq=lastmodified:[' + sixMonthsFromNow.toISOString() + '+TO+NOW]';

// &fq=lastmodified:[2013-11-27T08:57:10.089Z+TO+NOW]

1

solved Get last 6 months from in Jquery