02

Jun

Using Javascript to calculate Dates

June 2nd 2009 1:44 pm by Matt

This is also a part of this obnoxious and ridiculous reporting application that I’m using. I have a need to populate start date and end fields with a more user-friendly system. So I’ve got a dropdown with a few set options (Today, Last Week, Week to Date, etc.). Most of the code for these things is available around the internet, but the tricky part was calculating the weekly dates relative to the current date. IE grabbing “Week to date” and “Last Week” date ranges.

Read the rest of this entry »