I'm trying to figure out the proper way to get the javascript Date object for 8 days in the future from today.
Why? because I want to subtract a given Date from today's date and if it is less than or equal to 8 days in the future then do something.
So, I figured out how to parse the given date with new Date('2014-11-21T00:00:00.000-05:00')
and get the date object from that and then I can subtract it from today like so: new Date('2014-12-25T00:00:00.000-05:00') - new Date()
and then I have to compare that to the date object for 8 days in the future - today's date object.
Here's how I thought about doing the date object for the date 8 days in the future: I created a new Date with all measurements of time the same as today except I added 8 to the day. This works, except what if today is less than 8 days from the end of the month, then how do I get it to overflow into the next month. For example the 27th + 8 ( of october ) should be november 4th and not october's 35th.