View previous topic :: View next topic |
Author |
Message |
Dr. Dread Professional Member
Joined: 03 Aug 2001 Posts: 1065 Location: Copenhagen, Denmark
|
Posted: Wed Dec 17, 2003 7:53 am Post subject: TimeDate DLL |
|
|
Another DLL coming up. Will supply a number of functions to obtain, manipulate, and evaluate date and time
values in VDS. High resolution - will operate into milliseconds level.
Feature highlights so far:
* Encode date/time value (make VDS compatible DT values)
* Decode date/time value to get millisecs
* Date validation
* High-res Wait (Msecs)
* GMTbias
* Set system date/time
* Add/subtract months/days/hours/mins etc. to/from date/time values
* Convert to UNIX time value
* Convert to Julian date
* Obtain Week No from specified date
* WeekDay (is that day Friday or Monday?? etc.)
* Occurrence of a weekday within a month
* DayOfYear (get a specified day's number in that year)
* Number of days in specified Month
* Number of days in specified Year (identify leap years etc.)
* Windows UpTime
Greetz
Dr. Dread
BTW: It would be nice if a couple of you guys could do a bit of testing. _________________ ~~ Alcohol and calculus don't mix... Don't drink and derive! ~~
String.DLL * advanced string processing |
|
Back to top |
|
|
arcray Valued Contributor
Joined: 13 Jul 2001 Posts: 242 Location: Aude, France
|
Posted: Wed Dec 17, 2003 9:37 am Post subject: |
|
|
Hi Dr. Dread
I would find a better time/date dunction very useful, so I'd be happy to beta test!
Andy _________________ Andrew GRAY
If you don't know I am looking for work, I won't get the job.
andrewrcgray.com |
|
Back to top |
|
|
jwfv Valued Contributor
Joined: 19 Mar 2002 Posts: 422 Location: Beaufort, SC
|
Posted: Wed Dec 17, 2003 4:27 pm Post subject: |
|
|
Sounds great! I have wanted some better date/time functions for a while. _________________ Joe Floyd |
|
Back to top |
|
|
Vic D'Elfant Past Contributor
Joined: 26 Jun 2002 Posts: 673 Location: The Netherlands
|
Posted: Wed Dec 17, 2003 6:09 pm Post subject: |
|
|
Sounds great! You can count me in!
Best regards,
Vic _________________ phpBB Development Team |
|
Back to top |
|
|
LiquidCode Moderator Team
Joined: 05 Dec 2000 Posts: 1751 Location: Space and Time
|
Posted: Wed Dec 17, 2003 7:00 pm Post subject: |
|
|
That would be great! Me too. _________________ Chris
Http://theblindhouse.com |
|
Back to top |
|
|
FreezingFire Admin Team
Joined: 23 Jun 2002 Posts: 3508
|
Posted: Wed Dec 17, 2003 7:47 pm Post subject: |
|
|
I'd like to test also if I may! _________________ FreezingFire
VDSWORLD.com
Site Admin Team |
|
Back to top |
|
|
Serge Professional Member
Joined: 04 Mar 2002 Posts: 1480 Location: Australia
|
Posted: Wed Dec 17, 2003 11:55 pm Post subject: |
|
|
let me know if you need one more beta tester...can't test the unix bit as i know nothing about unix
serge _________________
|
|
Back to top |
|
|
Dr. Dread Professional Member
Joined: 03 Aug 2001 Posts: 1065 Location: Copenhagen, Denmark
|
Posted: Thu Dec 18, 2003 6:54 am Post subject: |
|
|
Beta testers...
An updated version of the test package has been uploaded to the the same URL. No big changes though:
- @timedate(diff) function now returns fractions of the time units
- updates to the help file. A couple of errors corrected
Greetz
Dread
BTW: Suggestions for other handy time and date funcs are welcome. _________________ ~~ Alcohol and calculus don't mix... Don't drink and derive! ~~
String.DLL * advanced string processing |
|
Back to top |
|
|
FreezingFire Admin Team
Joined: 23 Jun 2002 Posts: 3508
|
Posted: Thu Dec 18, 2003 11:24 am Post subject: |
|
|
You might want to add in a few things like to get how long it has been
since the computer was booted, etc.
You can do that with the GetTickCount API. _________________ FreezingFire
VDSWORLD.com
Site Admin Team |
|
Back to top |
|
|
Dr. Dread Professional Member
Joined: 03 Aug 2001 Posts: 1065 Location: Copenhagen, Denmark
|
Posted: Thu Dec 18, 2003 12:52 pm Post subject: |
|
|
FreezingFire wrote: | You might want to add in a few things like to get how long it has been
since the computer was booted, etc.
|
Now that's an easily implemented suggestion coz it's already there. Look for the @timedate(Uptime) function
Greetz
Dread _________________ ~~ Alcohol and calculus don't mix... Don't drink and derive! ~~
String.DLL * advanced string processing |
|
Back to top |
|
|
FreezingFire Admin Team
Joined: 23 Jun 2002 Posts: 3508
|
Posted: Thu Dec 18, 2003 8:39 pm Post subject: |
|
|
Sorry. I forgot it was in there. _________________ FreezingFire
VDSWORLD.com
Site Admin Team |
|
Back to top |
|
|
Dr. Dread Professional Member
Joined: 03 Aug 2001 Posts: 1065 Location: Copenhagen, Denmark
|
|
Back to top |
|
|
Dr. Dread Professional Member
Joined: 03 Aug 2001 Posts: 1065 Location: Copenhagen, Denmark
|
Posted: Sat Jan 03, 2004 1:20 pm Post subject: |
|
|
Version 1.1 is out.
Minor corrections. New functions added.
Greetz
Dr. Dread _________________ ~~ Alcohol and calculus don't mix... Don't drink and derive! ~~
String.DLL * advanced string processing |
|
Back to top |
|
|
Vic D'Elfant Past Contributor
Joined: 26 Jun 2002 Posts: 673 Location: The Netherlands
|
Posted: Wed Jan 21, 2004 9:27 am Post subject: |
|
|
Hi,
I've found a bug in the timedate extension, which causes to generate an 'unhandled exception in external command of function'
Try the code below:
Code: |
external timedate.dll
#define function, timedate
%T = @datetime(dd, @timedate(IncTime, weeks, 1, @datetime(yyyy), @datetime(mm), @datetime(dd), @datetime(hh), @datetime(nn), @datetime(ss))), @datetime(mm, @timedate(IncTime, weeks, 1, @datetime(yyyy), @datetime(mm), @datetime(dd), @datetime(hh), @datetime(nn), @datetime(ss))), @datetime(yyyy, @timedate(IncTime, weeks, 1, @datetime(yyyy), @datetime(mm), @datetime(dd), @datetime(hh), @datetime(nn), @datetime(ss)))
%T = @datetime(dd, @timedate(IncTime, weeks, 2, @datetime(yyyy), @datetime(mm), @datetime(dd), @datetime(hh), @datetime(nn), @datetime(ss))), @datetime(mm, @timedate(IncTime, weeks, 2, @datetime(yyyy), @datetime(mm), @datetime(dd), @datetime(hh), @datetime(nn), @datetime(ss))), @datetime(yyyy, @timedate(IncTime, weeks, 2, @datetime(yyyy), @datetime(mm), @datetime(dd), @datetime(hh), @datetime(nn), @datetime(ss)))
%T = @timedate(unix, @datetime(yyyy), @datetime(mm), @datetime(dd))
%T = @timedate(unix, @datetime(yyyy), @datetime(mm), @datetime(dd))
%%Date = @timedate(unix, @datetime(yyyy), @datetime(mm), @datetime(dd))
|
Sometimes the script is completed without errors, and sometimes there is an error at the 7th line.
Regards,
Vic _________________ phpBB Development Team |
|
Back to top |
|
|
Dr. Dread Professional Member
Joined: 03 Aug 2001 Posts: 1065 Location: Copenhagen, Denmark
|
Posted: Wed Jan 21, 2004 10:40 am Post subject: |
|
|
You may wanna stick with the DLL syntax..
For the UNIX function it's like this:
Quote: | @timedate(UNIX, Year, Month, Day, Hour, Minute, Second, MilliSecond) |
Even though some of the parameters are null you should write the entire function call like this (that is with empty
positions for the null params):
Code: | %%Date = @timedate(unix, @datetime(yyyy), @datetime(mm), @datetime(dd),,,,) |
Greetz
Dread _________________ ~~ Alcohol and calculus don't mix... Don't drink and derive! ~~
String.DLL * advanced string processing |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|