# Variable holiday-- how to code?

## Recommended Posts

Say thanksgiving (last thu of nov)... how do you code that?

Help

Thanks!

##### Share on other sites

What exactly are you trying to do? A little more detail would help quite a bit.

##### Share on other sites

I think you mean how to save dates in AutoIt.

[center]It's a question of mind over matter, if I don't mind, it doesn't matter.[/center]

##### Share on other sites

@sensalim

This will give you a start.

If I'm missing something here, its 5am where I am

Say thanksgiving (last thu of nov)... how do you code that?

Edit: American Thanksgiving is the 4th Thursday in November, not the last Thursday.

use the code below this box.

```#include <Date.au3>
; get date of Thanksgiving USA for current year (last Thursday of November)
For \$i = 0 To 6
\$ThanksgivingDate = 30 - \$i
If _DateToDayOfWeek(@YEAR, 11, \$ThanksgivingDate) = 5 Then ExitLoop
Next
MsgBox( 4096, "", "Thanksgiving USA is:" & @CRLF &  "Nov " & \$ThanksgivingDate & ", " & @YEAR)
ConsoleWrite("+Thanksgiving USA " & @YEAR & " is: Nov " & \$ThanksgivingDate & @CRLF & @CRLF)

; runs if date is Thanksgiving USA
If Number(@MON) = 11 And Number(@WDAY) = 5 And (30 - Number(@MDAY)) < 7 Then
MsgBox( 4096, "", "Today is Thanksgiving USA " & @CRLF & "Nov " & @MDAY & ", " & @YEAR)
EndIfoÝ÷ Ù±Ý¿nW¶­rú+Ó~¢2íö«u«­¢+ØìÐÑ½Q¡¹­Í¥Ù¥¹UM½È¥Ù¸åÈ ÑÑ ¨Q¡ÕÉÍä½9½ÙµÈ¤)1½°ÀÌØíåÈôeH)1½°ÀÌØíQ¡¹­Í¥Ù¥¹ÑUMô}ÑÑ±½Ñ¥¹!½±¥ä ÀÌØíåÈ°ÄÄ°Ô°Ð¤)
½¹Í½±]É¥Ñ ÅÕ½ÐìÌÌíQ¡¹­Í¥Ù¥¹UMÅÕ½ÐìµÀìÀÌØíåÈµÀìÅÕ½Ðì¥Ìè9½ØÅÕ½ÐìµÀìÀÌØíQ¡¹­Í¥Ù¥¹ÑUMµÀì
I1¤)5Í    ½à ÐÀäØ°ÅÕ½Ðí}ÑÑ±½Ñ¥¹!½±¥ä ¤ÅÕ½Ðì°ÅÕ½ÐíQ¡¹­Í¥Ù¥¹UM¥Ìè9½Ø¼ÅÕ½ÐìµÀìÀÌØíQ¡¹­Í¥Ù¥¹ÑUMµÀìÅÕ½Ðì¼ÅÕ½ÐìµÀìÀÌØíåÈ¤((ìÉÕ¹Ì¥Ñ¥ÌQ¡¹­Í¥Ù¥¹UM)%9ÕµÈ¡5=8¤ôÄÄ¹9ÕµÈ¡5d¤ÐìôÈÈ¹9ÕµÈ¡]d¤ôÔ¹9ÕµÈ¡5d¤ô}ÑÑ±½Ñ¥¹!½±¥ä¡eH°ÄÄ°Ô°Ð¤Q¡¸(5Í  ½à ÐÀäØ°ÅÕ½ÐìÅÕ½Ðì°ÅÕ½ÐíQ½ä¥ÌQ¡¹­Í¥Ù¥¹UMè9½Ø¼ÅÕ½ÐìµÀì5dµÀìÅÕ½Ðì¼ÅÕ½ÐìµÀìeH¤)¹%((ìÐÑ½Q¡¹­Í¥Ù¥¹
8½È¥Ù¸åÈ É¹5½¹ä½=Ñ½È¤)1½°ÀÌØíåÈôeH)1½°ÀÌØíQ¡¹­Í¥Ù¥¹Ñ
8ô}ÑÑ±½Ñ¥¹!½±¥ä ÀÌØíåÈ°ÄÀ°È°È¤)
½¹Í½±]É¥Ñ ÅÕ½ÐìÌÌíQ¡¹­Í¥Ù¥¹
8ÅÕ½ÐìµÀìÀÌØíåÈµÀìÅÕ½Ðì¥Ìè=ÐÅÕ½ÐìµÀìÀÌØíQ¡¹­Í¥Ù¥¹Ñ
8µÀì
I1¤)5Í    ½à ÐÀäØ°ÅÕ½Ðí}ÑÑ±½Ñ¥¹!½±¥ä ¤ÅÕ½Ðì°ÅÕ½ÐíQ¡¹­Í¥Ù¥¹
8¥Ìè=Ð¼ÅÕ½ÐìµÀìÀÌØíQ¡¹­Í¥Ù¥¹Ñ
8µÀìÅÕ½Ðì¼ÅÕ½ÐìµÀìÀÌØíåÈ¤((ìÉÕ¹Ì¥Ñ¥ÌQ¡¹­Í¥Ù¥¹
8)%9ÕµÈ¡5=8¤ôÄÀ¹9ÕµÈ¡5d¤Ðìôà¹9ÕµÈ¡]d¤ôÈ¹9ÕµÈ¡5d¤ô}ÑÑ±½Ñ¥¹!½±¥ä¡eH°ÄÀ°È°È¤Q¡¸(5Í ½à ÐÀäØ°ÅÕ½ÐìÅÕ½Ðì°ÅÕ½ÐíQ½ä¥ÌQ¡¹­Í¥Ù¥¹
8è=Ð¼ÅÕ½ÐìµÀì5dµÀìÅÕ½Ðì¼ÅÕ½ÐìµÀìeH¤)¹%((ìÐÑ½5ÉÑ¥¸1ÕÑ¡È-¥¹ÌäíÌ¥ÉÑ¡ä¡UM¤½È¥Ù¸åÈ ÍÉ5½¹ä½)¹ÕÉä¤)1½°ÀÌØíåÈôeH)1½°ÀÌØí51-¥ÉÑ¡äô}ÑÑ±½Ñ¥¹!½±¥ä ÀÌØíåÈ°Ä°È°Ì¤)
½¹Í½±]É¥Ñ ÅÕ½ÐìÌÌí51,ÌäíÌ¥ÉÑ¡äÅÕ½ÐìµÀìÀÌØíåÈµÀìÅÕ½Ðì¥Ìè)¸ÅÕ½ÐìµÀìÀÌØí51-¥ÉÑ¡äµÀì
I1¤)5Í    ½à ÐÀäØ°ÅÕ½Ðí}ÑÑ±½Ñ¥¹!½±¥ä ¤ÅÕ½Ðì°ÅÕ½Ðí51,ÌäíÌ¥ÉÑ¡ä¥Ìè)¸¼ÅÕ½ÐìµÀìÀÌØí51-¥ÉÑ¡äµÀìÅÕ½Ðì¼ÅÕ½ÐìµÀìÀÌØíåÈ¤((ìÉÕ¹Ì¥Ñ¥Ì5ÉÑ¥¸1ÕÑ¡È-¥¹ÌäíÌ¥ÉÑ¡ä¡UM¤)%9ÕµÈ¡5=8¤ôÄ¹9ÕµÈ¡5d¤ÐìôÄÔ¹9ÕµÈ¡]d¤ôÈ¹9ÕµÈ¡5d¤ô}ÑÑ±½Ñ¥¹!½±¥ä¡eH°Ä°È°Ì¤Q¡¸(5Í  ½à ÐÀäØ°ÅÕ½ÐìÅÕ½Ðì°ÅÕ½ÐíQ½ä¥Ì5ÉÑ¥¸1ÕÑ¡È-¥¹ÌäíÌ¥ÉÑ¡ä¡UM¤è)¸¼ÅÕ½ÐìµÀì5dµÀìÅÕ½Ðì¼ÅÕ½ÐìµÀìeH¤)¹%(((ìU9
Q%=8ìôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôô(ì9µ¸¸¸¸¸¸¸¸¸¸¸è}ÑÑ±½Ñ¥¹!½±¥ä(ìÍÉ¥ÁÑ¥½¸¸¸¸èIÑÕÉ¹ÌÑ¡Ñ½±½Ñ¥¹¡½±¥ä½È¥Ù¸åÈ½µ½¹Ñ ½Ý­ä½Ý­¹ÕµÈ¸(ìMå¹Ñà¸¸¸¸¸¸¸¸¸è}ÑÑ±½Ñ¥¹!½±¥ä ÀÌØí¥eÈôeH°ÀÌØí¥5½¹Ñ ô5=8°ÀÌØí¥]­äôÀ°ÀÌØí¥9Ñ¡]¬ôÀ¤(ìAÉµÑÉÌ¸¸¸¸èÀÌØí¥eÈ´Ù±¥åÈ¥¸½ÉµÐeeed(ìÀÌØí¥5½¹Ñ ´Ù±¥µ½¹Ñ ¥¸½ÉµÐ54(ìÀÌØí¥]­ä´Ù±¥Ý­ä¥¸½ÉµÐèÄÑ¼Ü¡MÕ¹äÑ¼MÑÕÉä¤(ìÀÌØí¥9Ñ¡]¬´Ù±¥Ý¬½µ½¹Ñ ¹ÕµÈ¥¸½ÉµÐèÄÑ¼Ô(ìIÑÕÉ¸Ù±ÕÌ¸èMÕÍÌ´Ñ½¡½±¥ä(ì¥±ÕÉ´IÑÕÉ¹ÌÀ¹ÉÉ½È¥ÌÍÐ(ìÕÑ¡½È¸¸¸¸¸¸¸¸èÉ½ÙÈ(ì5½¥¥¸¸¸¸¸¸¸è(ìIµÉ­Ì¸¸¸¸¸¸¸è(ìI±Ñ¸¸¸¸¸¸¸è(ì1¥¹¬¸¸¸¸¸¸¸¸¸¸ì¡ÑÑÀè¼½ÝÝÜ¹ÁÉÍ½¸¹½´½á°½¡½±¥åÌ¹¡Ñ´(ìáµÁ±¸¸¸¸¸¸¸ìeÌ(ì(ìôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôôô)Õ¹}ÑÑ±½Ñ¥¹!½±¥ä ÀÌØí¥eÈôeH°ÀÌØí¥5½¹Ñ ô5=8°ÀÌØí¥]­äôÀ°ÀÌØí¥9Ñ¡]¬ôÀ¤(%%¡9½ÐÀÌØí¥eÈ¤=È¡9½ÐÀÌØí¥5½¹Ñ ¤=È¡9½ÐÀÌØí¥]­ä¤=È¡9½ÐÀÌØí¥9Ñ¡]¬¤Q¡¸IÑÕÉ¸MÑÉÉ½È Ä°À°À¤(%1½°ÀÌØí¥½ô}ÑQ½å=]¬ ÀÌØí¥eÈ°ÀÌØí¥5½¹Ñ °Ä¤(%IÑÕÉ¸ Ä¬  ÀÌØí¥9Ñ¡]¬´ ÀÌØí¥]­äÐìôÀÌØí¥½¤¤¨Ü¤¬ ÀÌØí¥]­ä´ÀÌØí¥½¤¤)¹Õ¹```
Edited by rover

I see fascists...

## Create an account

Register a new account

×

• Wiki

• Back

• Git