argumentum Posted August 20, 2007 Share Posted August 20, 2007 #include <Date.au3> ;ConsoleWrite( _WeekNumberISO(2007,08,19) &@CRLF ); ( $iYear=@YEAR, $iMonth=@MON, $iDay=@MDAY ) ConsoleWrite( _WeekNumberr(2007,08,18) &@CRLF ) ConsoleWrite( _WeekNumberr(2007,08,19) &@CRLF ) ConsoleWrite( _WeekNumberr(2007,08,20) &@CRLF ) ConsoleWrite( _WeekNumberr(2007,08,21) &@CRLF ) Func _WeekNumberr($Y, $M, $D) $sJulDate = _DateToDayValue ($Y, $M, $D) ;MsgBox(4096, "", "Todays Julian date is: " & $sJulDate) ; 14 days ago calculation. Dim $Y1, $M1, $D1 $sJulDate = _DayValueToDate ($sJulDate+1, $Y1, $M1, $D1) Return _WeekNumberISO($Y1, $M1, $D1) ;MsgBox(4096, "", "14 days ago:" & $M & "/" & $D & "/" & $Y) EndFunchmmm, going nutz my self here, ... and to discover that ERROR: _WeekNumber() already defined. , can it plz be added to the help file =/ Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting. Link to comment Share on other sites More sharing options...
BrettF Posted August 20, 2007 Share Posted August 20, 2007 #include <Date.au3> ;ConsoleWrite( _WeekNumberISO(2007,08,19) &@CRLF ); ( $iYear=@YEAR, $iMonth=@MON, $iDay=@MDAY ) ConsoleWrite( _WeekNumberr(2007,08,18) &@CRLF ) ConsoleWrite( _WeekNumberr(2007,08,19) &@CRLF ) ConsoleWrite( _WeekNumberr(2007,08,20) &@CRLF ) ConsoleWrite( _WeekNumberr(2007,08,21) &@CRLF ) Func _WeekNumberr($Y, $M, $D) $sJulDate = _DateToDayValue ($Y, $M, $D) ;MsgBox(4096, "", "Todays Julian date is: " & $sJulDate) ; 14 days ago calculation. Dim $Y1, $M1, $D1 $sJulDate = _DayValueToDate ($sJulDate+1, $Y1, $M1, $D1) Return _WeekNumberISO($Y1, $M1, $D1) ;MsgBox(4096, "", "14 days ago:" & $M & "/" & $D & "/" & $Y) EndFunc hmmm, going nutz my self here, ... and to discover that ERROR: _WeekNumber() already defined. , can it plz be added to the help file =/ What are you trying to achive?? Is this a request for it to be added to the helpfile? Are you asking for help with your code? Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
PsaltyDS Posted August 20, 2007 Share Posted August 20, 2007 The function _WeekNumber() is in the Date.au3 standard UDF that comes with AutoIt: ;=============================================================================== ; ; Function Name: _WeekNumber() ; Description: Find out the week number of current date OR date given in parameters ; ; Parameter(s): $iDay - Day value (default = current day) ; $iMonth - Month value (default = current month) ; $iYear - Year value (default = current year) ; $iWeekstart - Week starts from Sunday (1, default) or Monday (2) ; Requirement(s): ; Return Value(s): On Success - Returns week number of given date ; On Failure - returns -1 and sets @ERROR = 1 on faulty parameters values ; On non-acceptable weekstart value sets @ERROR = 99 and uses default (Sunday) as starting day ; Author(s): JdeB ;===============================================================================oÝ÷ Ù8b±û§rب¬mç§z{bérêeiÇo%zCn·«!#ºÚ"µÍÏOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOBÂÈ[Ý[Û[YNÕÙYZÓ[XTÓÊ BÈØÜ[Û[Ý]HÙYZÈ[XÙÝ[]HÔ]HÚ][[[Y]ÂÂÈ[Y]ÊN ÌÍÚQ^HH^H[YH Y][HÝ[^JBÈ ÌÍÚS[ÛH[Û[YH Y][HÝ[[Û BÈ ÌÍÚVYXHYX[YH Y][HÝ[YXBÈ]Z[Y[ ÊNÈ][YJÊNÛÝXØÙÜÈH]ÈÙYZÈ[XÙÚ][]BÈÛZ[HH]ÈLH[Ù]ÈTÔHHÛ][H[Y]È[YÂÈÛÛXXØÙXHÙYZÜÝ[YHÙ]ÈTÔHNH[ÙÈY][ Ý[^JHÈÝ[È^BÈ]]ÜÊNXBÈP[ÙYYYÈQÝ[È [ÈØËÈPÚ[ÙHØ[Ý[][ÛÙÚXËÏOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO I suspect the old version is deprecated and no longer support, just left in place to support legacy code. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
argumentum Posted August 20, 2007 Author Share Posted August 20, 2007 I suspect the old version is deprecated and no longer support, just left in place to support legacy code. ...then, I should user _WeekNumberISO and tweak my code based on that function, for _WeekNumber one day may just not be there. Am I wright ? Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting. Link to comment Share on other sites More sharing options...
PsaltyDS Posted August 20, 2007 Share Posted August 20, 2007 ...then, I should user _WeekNumberISO and tweak my code based on that function, for _WeekNumber one day may just not be there. Am I wright ?That's correct. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law 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