Build a List of Hours (Classic ASP)

You could need a list of "Hours" for any number of reasons, for a select box, checkboxes, radio buttons, etc. In the following example, I create a list of "Hours" to run along the top of a table. What strikes me interesting about this code is that although it was written in 2001, its very adaptable to generating hour lists today.

Function BuildHourList()
	Dim i, iOffSet
	For i = 8 to 20
		' ---- if past 12 noon, 
		If i > 12 Then iOffSet = -12 
		Response.Write "" & iOffset + i & ":00"
	Next
End Function

AuthorInfo

Joe is a User Experience Engineer, Front End Specialist and Application Developer for Bridgeway Software, Inc and part-time consultant for NGO and non-profit organizations in the Houston area. Joe is also a part-time Portrait Photographer at MEDIA.24Moves.com and organizer of the HoustonPhotowalks.com photography club. He and his wife Marty run the AutismHouston.com Support and Playdate group.

-

@ext237

-

@drupaltips

-

Flickr

-

LinkedIn

-

Ports

-

Contact


Fatal error: Class CToolsCssCache contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (DrupalCacheInterface::__construct) in /home/content/e/x/t/ext237/html/modules/ctools/includes/css-cache.inc on line 52