mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jul 2003
Posts: 39
X
Xanadu Offline OP
Ameglian cow
OP Offline
Ameglian cow
X
Joined: Jul 2003
Posts: 39
I would like to do something like $ctime(), but compared to a date other than Jan 1, 1970. Is there a similar command that lets you put in your own dates to compare?

Thanks

Joined: Mar 2003
Posts: 1,271
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Mar 2003
Posts: 1,271
Store all dates in $ctime format. Thjat gives you numerical values like 1069011298 for Sun Nov 16 20:35:03 2003. You can use mathematical functions and if statements on that.


DALnet #Helpdesk
I hear and I forget. I see and I remember. I do and I understand. -Confucius
Joined: Jan 2003
Posts: 3,012
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
alias ctime2 {
return $calc($ctime - $asctime(January 1 2001 00:00:00))
}

That will give you the ctime since the first day of the year 2001. Alter the $asctime() value to suite your needs


-KingTomato
Joined: Aug 2003
Posts: 1,831
I
Hoopy frood
Offline
Hoopy frood
I
Joined: Aug 2003
Posts: 1,831
//var %a = $ctime - $ctime(Jan 1 2003) | echo -a This is day $calc(%a / 86400 + 1) of this year

//echo -a $duration($calc($ctime - $ctime(Jan 1 2000)))


Link Copied to Clipboard