mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Mar 2003
Posts: 86
N
NRJ Offline OP
Babel fish
OP Offline
Babel fish
N
Joined: Mar 2003
Posts: 86
I want to calculatate, what day is in 7 days or so and I cannot only use the $calc-identifier, but the weeks/month/years are variable. How I can use a calendar feature in mIRC?

Greets, Mathias

Joined: Dec 2002
Posts: 2,962
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,962
You should be able to come up with something using $asctime.


Spelling mistakes, grammatical errors, and stupid comments are intentional.
Joined: Dec 2002
Posts: 77
B
Babel fish
Offline
Babel fish
B
Joined: Dec 2002
Posts: 77
//echo -a In 5 days time it will be $asctime($calc($ctime + (86400 * 5)), dddd dd mmmm yyyy)

would return...

In 5 days time it will be Wednesday 11 March 2003

like starbucks says, check out $asctime for further info.

Joined: Feb 2003
Posts: 15
R
Pikka bird
Offline
Pikka bird
R
Joined: Feb 2003
Posts: 15
you need to use $ctime value .. for 24 hours $ctime value is 86400 so you have to multiply 86400 by 7 to find out what was day/timer/year etc 7 days ago .. it may look like ...

//echo -a $asctime($calc($ctime - (86400 * 7)))


check >> /help $ctime , /help $asctime

Joined: Feb 2003
Posts: 15
R
Pikka bird
Offline
Pikka bird
R
Joined: Feb 2003
Posts: 15
you may try this remote to find out day ...

on *:input:*: { if (*/+d* iswm $1) { echo -a $asctime($calc($ctime + (86400 * $2)),dddd) | halt } | elseif (*/-d* iswm $1) { echo -a $asctime($calc($ctime - (86400 * $2)),dddd) | halt } }


then type /+d number ex: /+d 5 mean you want to know day after 5 days.

or /-d number ex: /-d 5 mean you want to know day before 5 days .

Joined: Mar 2003
Posts: 86
N
NRJ Offline OP
Babel fish
OP Offline
Babel fish
N
Joined: Mar 2003
Posts: 86
mh, and how I can calculate the differenz between a date in the future and the today's date?

Example:

Future date: 07/04/03
Today's date: 07/03/03

How much sits these are still up to the date in the future?


Greets, Mathias

Joined: Dec 2002
Posts: 77
B
Babel fish
Offline
Babel fish
B
Joined: Dec 2002
Posts: 77
//echo -a $duration($calc($ctime(07/04/03) - $ctime(07/03/03)))

All this is very well explained in the mIRC manual.

Last edited by BlackAle; 07/03/03 06:24 PM.
Joined: Mar 2003
Posts: 86
N
NRJ Offline OP
Babel fish
OP Offline
Babel fish
N
Joined: Mar 2003
Posts: 86
Thankyou! I must watch next time probably more in the Time and Date Identifiers... smile

Greets, Mathias

Joined: Feb 2003
Posts: 15
R
Pikka bird
Offline
Pikka bird
R
Joined: Feb 2003
Posts: 15
you want to know how many days there ??

//echo -a $calc(($ctime(07/04/03) - $ctime(07/03/03)) / 86400)

Joined: Dec 2002
Posts: 271
N
Fjord artisan
Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 271
//echo -a $asctime($ctime(11\03\2003))

returns:

Tue Mar 11 00:00:00 2003

/help $asctime


Link Copied to Clipboard