Top

$datediff

Please Register to submit score.
Average Score  8.0
Scores Submitted  2
Date Added  Oct 13, 2006
Last Updated  Nov 15, 2006
Tags  birthday  date  duration  months  weeks  years 

Introduction

The purpose of this snippet is to bring the power of VB's DateDiff function to mIRC which date handling functions can be quite restricting.
This snippet allows you to calculate the difference between ANY date in whatever timespan you specify so you can easily check how many days have passed since Washington became president which is 79423 days at the time of writing this :). It also allows you to easily do birthday bots and seen scripts that cover years in duration.

Grab the Code

Comments

  (8)  RSS
Cherish
Comments: 11
 
mIRC Snippet:  $datediff
Posted on Oct 15, 2006 3:01 am
ERROR COM
* No such Com 'dd916111' open (line 60, script7.mrc)
Mpdreamz
Comments: 29
 
mIRC Snippet:  $datediff
Posted on Oct 15, 2006 4:36 am
oops forgot a return there. What windows version are you using ?
Cherish
Comments: 11
 
mIRC Snippet:  $datediff
Posted on Oct 15, 2006 2:53 pm
Microsoft Windows 98 (version: 4.10.1998) :D
Mpdreamz
Comments: 29
 
mIRC Snippet:  $datediff
Posted on Oct 22, 2006 4:01 am
Thought so :)
The Com object i use is only for ME/2000 or higher I am working on a 98 compliant version using wscript.shell but involves writing a vbs file to your machine and setting an environment variable on your machine something virus scanners might not like so therefore windows 98 support will be tacky :P
Cherish
Comments: 11
 
mIRC Snippet:  $datediff
Posted on Nov 3, 2006 11:56 am
Ok.. But dd/mm/yy I think is better becouse $date, $fulldate and other identifers use it.
QuickStep
Comments: 123
 
mIRC Snippet:  $datediff
Posted on Nov 3, 2006 12:19 pm
Theoratically this isn't all that hard to do in mIRC script. A normal year contains 31536000 seconds and a leapyear 31622400 seconds. Rest is just basic calculations.
Mpdreamz
Comments: 29
 
mIRC Snippet:  $datediff
Posted on Nov 14, 2006 5:31 pm
True however this wont just return seconds, but also months quarters and years something which would take alot of mirc $calcing power and would run rather slow on big numbers.
Mpdreamz
Comments: 29
 
mIRC Snippet:  $datediff
Posted on Nov 14, 2006 5:44 pm
Cherish it will accept any VB date :)

Please Register or Login to start posting comments.
Bottom