So this script:
Code: Select all
TargetDate := "2021" "04" "28"
UpdateCountdown:
SetTimer, UpdateCountdown, % 86400000 - 1000 * DateDiff( A_Year A_MM A_DD, A_Now, "s" )
Gui, Show, W250 H50, % DateDiff( A_Now, TargetDate, "d" ) " Days Left"
Return
Esc::Exitapp
DateDiff( startdate, enddate, units="d" ) {
If units NOT IN s,sec,second,seconds,m,min,minute,minutes,h,hour,hours,d,day,days
units := "d" ; days
Else StringLeft, units, units, 1
enddate -= startdate, %units%
return enddate
}
I tried experimenting with some returns here and there, but nothing so far...
This solution must be similar to viewtopic.php?f=6&t=1629, but I can't quite figure it out on my own
Kind regards,
...