mIRC Homepage
Posted By: MTec89 vars - 01/11/03 05:22 PM
hi
i have this var in my script, %first.run, it is set to the first day my script was ran. how can i add 30 days to that day and switch months or years if nessisary and set it to %last.run?
Posted By: LocutusofBorg Re: vars - 01/11/03 06:54 PM
You can do regular math on it as long as you save the date in $ctime format.

on *:LOAD: set %first.run $ctime

Then you can simply add 30 days by adding the amt of seconds in 30 days to the var.

set %30days $calc($ctime + 30 * 24 * 3600)
Posted By: MTec89 Re: vars - 01/11/03 07:03 PM
ok i figured this much out:
$date($calc($ctime + 30 * 24 * 3600))
returns
01/12/03
instead of
12/01/03

and $date($ctime)
01/11/03
instead of
11/01/03
Posted By: zfr Re: vars - 01/11/03 10:40 PM
use $adate to get american style dates.
Posted By: pheonix Re: vars - 01/11/03 11:26 PM
shocked i thought americans used the same date format as england: day/month/year
Posted By: neophyte Re: vars - 02/11/03 02:15 AM
No. Americans use Month/Day/Year.

While the majority of the normal world uses day/month/year.

Silly country.
Posted By: Ashkrynt Re: vars - 02/11/03 04:45 AM
Actually the only reasonable system would be the ISO standard, YYYY/MM/DD. (Ordered from largest to smallest like the time, so it can be sorted alphabetically and come up in the right order)

At least the American system gets it right except for the year.
Posted By: MTec89 Re: vars - 02/11/03 04:51 AM
mm/dd/yyyy r0x j00r b0x3r5 ;p everything else is non standard IMO
Posted By: _D3m0n_ Re: vars - 02/11/03 05:44 AM
yes and the opinion of a wanna be leet talking child should be listened to by all, really the US is backwards from the rest of the world, no other country uses dates that way, now u can argue its because americans are backwards or everyone else is, but put quite simpley, the us does it to be different from the rest of the world, as with our non compliance with using the metric system, like the rest of the world, again this is by no means any arguement claiming who is correct and who isnt. and it isnt mirc's place to be figuring this out, mirc is for enjoying the ability to meet ppl ud never have the chance to any other way, politics and suchs shouldnt be its target.
Posted By: pheonix Re: vars - 02/11/03 07:01 AM
it's what you're used to i suppose, the idea of mm/dd/yy sounds idiotic to me.
Posted By: MTec89 Re: vars - 02/11/03 07:09 AM
i have known mm/dd/yyyy all my life and im used to it.
© mIRC Discussion Forums