Greetings just me
After giving it some thought the LDOM function will do what im after. Im not sure if i complicate things more than necessary. Here is the script im playing with, which also answers your questions. However I cant get the associative array with keys to work though. What have i done wrong? It actually works with the disabled simpler array though. With it i get the last day of the month before next three months period begins. When that actual day occurs i should be abled to fire up a reminder.
Code: Select all
Months := {"February": ["02"] ;for quarter March - May
, "May": ["05"] ;for quarter June - August
, "August": ["08"] ;for quarter September - November
, "November": ["11"] } ;for quarter December - February
;Months := ["02", "05", "08", "11"]
FormatTime, Year, % Tomorrow, yyyy ; Which year is it tomorrow
for Key, Month in Months {
msgbox % Key
msgbox % Month
Result := LDOM(Year . Month)
MsgBox % Result
}
return
LDOM(TimeStr="") {
If TimeStr=
TimeStr = %A_Now%
StringLeft Date,TimeStr,6 ; YearMonth
Date1 = %Date%
Date1+= 31,D ; A day in next month
StringLeft Date1,Date1,6 ; YearNextmonth
Date1-= %Date%,D ; Difference in days
Return Date1
}