I’m looking for a js (or jQuery) function where I pass a start date and end date, and the function returns on inclusive list (array or object) of each date in that range.
For example, if I pass this function a date object for 2010-08-31 and for 2010-09-02, then the function should return:
2010-08-31
2010-09-01
2010-09-02
Anyone have a function that does that or know of a jQuery plugin that would include this functionality?
It sounds like you might want to use Datejs. It is extremely awesome.
If you use Datejs, here’s how you could do it:
ex. for me:
returns an array with 3 Date objects: