Sign in to follow this  
Followers 0
sensalim

Variable holiday-- how to code?

4 posts in this topic

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

Help ;)

Thanks!

Share this post


Link to post
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 this post


Link to post
Share on other sites

#4 ·  Posted (edited)

@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...

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0