Skip to main content
little*big*man
Participating Frequently
June 10, 2009
Answered

Actionscript to determine if it's Thanksgiving?

  • June 10, 2009
  • 1 reply
  • 478 views

Other than calling getDate and then some hard-coded if statements, has anyone ever tackled the logic of figuring out if the current day is Thanksgiving (4th Thurs in November)?  Google didn't turn up anything (for Flash, at least).

Thanks,

Sean

This topic has been closed for replies.
Correct answer

You could just see how many thursday's have past in november? If today was thursday and 3 other's have past in novemeber then it would be thanksgiving.

1 reply

Correct answer
June 10, 2009

You could just see how many thursday's have past in november? If today was thursday and 3 other's have past in novemeber then it would be thanksgiving.

little*big*man
Participating Frequently
June 10, 2009

Ahh....so if it's Thursday, take the numerical value of the day that gets returned, and if it's greater than 21 (and less than 27, in case of 5 Thursdays in November) then it's Thanksgiving.

That's good - I owe you 2 beers today.  Thanks!