Early Games in London lock all Sunday games

Post here to discuss topics relate to the 4.x version for the ASP Football Pool software program. All support topics should go here.
Post Reply
andygb4
Posts: 11
Joined: Wed Oct 02, 2013 6:05 pm

Early Games in London lock all Sunday games

Post by andygb4 »

So this isn't really a question, but I thought it might help others in the future.

There's a game in London this week, and it's at 9:30 AM, so with the current logic of the pool, ALL of the Sunday (and Monday) games get locked at 9:30 AM.
Lot's of players in my pool didn't like that, since they all have their Sunday morning routines! :lol:

I looked at the code in the includes/common.asp page, and I think I found the solution, I tried testing it on dotnetfiddle.net and it seemed to work, but I can't fully confirm until I see how it reacts this upcoming Sunday.

So I looked for this line (around line 509 i believe)

Code: Select all

if Weekday(gameDateTime) = vbSunday and gameDateTime <= dateTime then
And I changed it to this:

Code: Select all

if Weekday(gameDateTime) = vbSunday and gameDateTime <= dateTime and Hour(gameDateTime) >= 13 then
So basically, I added 1 more clause to the IF statement that decides when to lock all games.
I added that the Hour of the game has to be equal or greater than 1:00 PM (13). Logically, the 9:30 game shouldn't make that IF statement true.

Hope this helps someone! :)

CAUTION: As I mentioned above, I tested this in a different environment, and it worked, but I never tested it in the football pool.
So if you choose to try it out, be ready Sunday morning to keep a close eye on it, and check if all games are locked or not.
And there's any sort of issue, just revert back to the old line of code.
User avatar
philwojo
Posts: 143
Joined: Mon Aug 26, 2013 4:22 pm

Re: Early Games in London lock all Sunday games

Post by philwojo »

Thanks for posting, I haven't compared, but her is the same solution from the past:

http://philwojo.com/ASP_Football_Forum_ ... p?f=6&t=58
Post Reply