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
You should be able to come up with something using $asctime.
//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.
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
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 .
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
//echo -a $duration($calc($ctime(07/04/03) - $ctime(07/03/03)))
All this is very well explained in the mIRC manual.
Thankyou! I must watch next time probably more in the Time and Date Identifiers...
Greets, Mathias
you want to know how many days there ??
//echo -a $calc(($ctime(07/04/03) - $ctime(07/03/03)) / 86400)
//echo -a $asctime($ctime(11\03\2003))
returns:
Tue Mar 11 00:00:00 2003
/help $asctime