I want to get up to six months using javascript.
I am using the following method.
var curr = date.getTime();
This is the right way or the best way to get the last six months.
If this is fixed, I want to apply this logic to get previous dates, for example, last 2 months and last 10 years, etc.
If any body gives a solution in jquery, this is also very useful for me. Thanks in advance.
source share