n9mfk9 Posted February 27, 2005 Posted February 27, 2005 I need to write a script that can tell me the date of last Wednesday of the month that has a Thursday after thanks for any ideas
Developers Jos Posted February 27, 2005 Developers Posted February 27, 2005 I need to write a script that can tell me the date of last Wednesday of the month that has a Thursday afterthanks for any ideas<{POST_SNAPBACK}>This should work #include <date.au3> for $x = 1 to 12 Msgbox(0,'get last wednesday','last Wednesday which has a following thursday in the same month for month:' & $x & @lf & Find_Last_Wedthu_of_month(2005,$x)) next Func Find_Last_Wedthu_of_month($year,$month) For $day = _DateDaysInMonth($year,$month) to 1 step -1 If _DateToDayOfWeek($year,$month,$day) = 5 Then return $day-1 EndIf Next EndFunc SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
n9mfk9 Posted February 27, 2005 Author Posted February 27, 2005 hi jdeb that woksks good there one question how cold i make $j be just the date that the script come um with thanks
Developers Jos Posted February 27, 2005 Developers Posted February 27, 2005 there one questionhow cold i make $j be just the date that the script come um with<{POST_SNAPBACK}> could you explain what you mean ? SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
n9mfk9 Posted February 27, 2005 Author Posted February 27, 2005 could you explain what you mean ?<{POST_SNAPBACK}>hi jdebhere is what i did it gives me what i wet but insted of have a msg box i wet to make it $j so in a script shanks beau #include <date.au3> $x = @MONMsgbox(0,'','' & Find_Last_Wedthu_of_month(@YEAR,$x)) Func Find_Last_Wedthu_of_month($year,$month) For $day2 = _DateDaysInMonth($year,$month) to 1 step -1 If _DateToDayOfWeek($year,$month,$day2) = 5 Then return $day2-1 EndIf NextEndFunc
Developers Jos Posted February 27, 2005 Developers Posted February 27, 2005 something like: #include <date.au3> $j = Find_Last_Wedthu_of_month(@YEAR,@MON) Func Find_Last_Wedthu_of_month($year,$month) For $day = _DateDaysInMonth($year,$month) to 1 step -1 If _DateToDayOfWeek($year,$month,$day) = 5 Then return $day-1 EndIf Next EndFunc SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
bedazzled Posted February 27, 2005 Posted February 27, 2005 looks like you need a program to do that sort of thing
Developers Jos Posted February 27, 2005 Developers Posted February 27, 2005 (edited) looks like you need a program to do that sort of thing<{POST_SNAPBACK}>what's wrong with this autoit program ? Edited February 27, 2005 by JdeB SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now