Javascript get day of week (bit more complex)
Posted: Fri Dec 31, 2004 4:31 am
Hi,
I've enhanced a little script my team use at work for submitting overtime (you didn't need to know that really).
Basically I want o make a drop down box which will display the dates of the past 6 fridays.
So what I need to know is how to obtain the date for the next coming friday, then get the date for 7 days prior to it, then then the date 7 days prior to that... and track back til I have 6 weeks in total.
How do I get the date? So if it was yesterday (thursday 30th Dec 2004) I'd want it to get these dates into an array. 31/12/04, 24/12/04, 17/12/04, 10/04/04, 03/12/04 and 26/11/04.
I don't need someone to write my code is just the obtaining of the date on a particular day I'm unsure of?
I've enhanced a little script my team use at work for submitting overtime (you didn't need to know that really).
Basically I want o make a drop down box which will display the dates of the past 6 fridays.
So what I need to know is how to obtain the date for the next coming friday, then get the date for 7 days prior to it, then then the date 7 days prior to that... and track back til I have 6 weeks in total.
How do I get the date? So if it was yesterday (thursday 30th Dec 2004) I'd want it to get these dates into an array. 31/12/04, 24/12/04, 17/12/04, 10/04/04, 03/12/04 and 26/11/04.
I don't need someone to write my code is just the obtaining of the date on a particular day I'm unsure of?