kaesereibe Posted July 24, 2014 Share Posted July 24, 2014 (edited) GetWeekdayGet the weekday on any given datee.g. 01.01.1990 ==> MondayFunc GetWeekday($M, $D, $Y) Static $WeekDay[7] = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"] If ($M < 3) Then $M += 12 $Y -= 1 EndIf $wd = Mod($D + (2 * $M) + Floor(6 * ($M + 1) / 10) + $Y + Floor($Y / 4) - Floor($Y / 100) + Floor($Y / 400) + 1, 7) Return $WeekDay[$wd] EndFunc ;==> GetWeekday() AutoIt v3.3.12.0 ; GetWeekday(Month, Day, Year) MsgBox(0, "Get Weekday", GetWeekday(1, 1, 1990)) ; 1990-01-01 --> Monday MsgBox(0, "Get Weekday", GetWeekday(4, 15, 2014)) ; 2014-04-15 --> Tuesday MsgBox(0, "Get Weekday", GetWeekday(9, 9, 1999)) ; 1999-09-09 --> ThursdayBuild-In#include <Date.au3> MsgBox(0, "", _DateDayOfWeek(_DateToDayOfWeek(@YEAR, @MON, @MDAY))) Edited July 24, 2014 by kaesereibe BIN 2 DEC | ConvertTemp | DEC 2 BIN | GetWeekday | HEX 2 RGB | INT 2 HEX | QueryPerformance Link to comment Share on other sites More sharing options...
careca Posted July 24, 2014 Share Posted July 24, 2014 Great job! Spoiler Renamer - Rename files and folders, remove portions of text from the filename etc. GPO Tool - Export/Import Group policy settings. MirrorDir - Synchronize/Backup/Mirror Folders BeatsPlayer - Music player. Params Tool - Right click an exe to see it's parameters or execute them. String Trigger - Triggers pasting text or applications or internet links on specific strings. Inconspicuous - Hide files in plain sight, not fully encrypted. Regedit Control - Registry browsing history, quickly jump into any saved key. Time4Shutdown - Write the time for shutdown in minutes. Power Profiles Tool - Set a profile as active, delete, duplicate, export and import. Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes. NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s. IUIAutomation - Topic with framework and examples Au3Record.exe Link to comment Share on other sites More sharing options...
Exit Posted July 24, 2014 Share Posted July 24, 2014 Your function is faster since 1. it has no error checking. try 1,0,1990 2. it has no support for locale languages German, French, ... App: Au3toCmd UDF: _SingleScript() Link to comment Share on other sites More sharing options...
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