Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Bi Weekly End of Week Date 1

Status
Not open for further replies.

techgirl2

MIS
Mar 3, 2003
10
0
0
US
I need to create a list of saturdays for a year. I want to be able to automatically select the saturday for the current week in a combo box of all saturdays in a year for a hourly work calculator. Can anyone help me?
Thanks!!
 
look at the functions gmmktime and getdate (look at the wday key imto the array)
 
The headline of your questions says bi-weekly, so do you need to create a list of every other Saturday?
Which Saturday of the year starts the list of Saturdays? The first or the second?

I would ascertain the first Saturday of the year and write a loop which adds 14*24*60*60 seconds to the UNIX timestamp of the first date. Output the new timestamp in the format you want using date(). Check during the output if the date is in the future or not (current timestamp - the value). For the first future date set the option tag to SELECTED.

Let's start with that. If you need code help, let us know!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top