mIRC Home    About    Download    Register    News    Help

Print Thread
vars #58685 01/11/03 05:22 PM
Joined: Jul 2003
Posts: 742
MTec89 Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Jul 2003
Posts: 742
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?


http://MTec89Net.com
irc.freenode.net #MTec89Net
Re: vars #58686 01/11/03 06:54 PM
Joined: Mar 2003
Posts: 1,271
L
LocutusofBorg Offline
Hoopy frood
Offline
Hoopy frood
L
Joined: Mar 2003
Posts: 1,271
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)


DALnet #Helpdesk
I hear and I forget. I see and I remember. I do and I understand. -Confucius
Re: vars #58687 01/11/03 07:03 PM
Joined: Jul 2003
Posts: 742
MTec89 Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Jul 2003
Posts: 742
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


http://MTec89Net.com
irc.freenode.net #MTec89Net
Re: vars #58688 01/11/03 10:40 PM
Joined: Oct 2003
Posts: 51
Z
zfr Offline
Babel fish
Offline
Babel fish
Z
Joined: Oct 2003
Posts: 51
use $adate to get american style dates.

Re: vars #58689 01/11/03 11:26 PM
Joined: May 2003
Posts: 2,265
P
pheonix Offline
Hoopy frood
Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
shocked i thought americans used the same date format as england: day/month/year


new username: tidy_trax
Re: vars #58690 02/11/03 02:15 AM
Joined: Apr 2003
Posts: 426
neophyte Offline
Fjord artisan
Offline
Fjord artisan
Joined: Apr 2003
Posts: 426
No. Americans use Month/Day/Year.

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

Silly country.


--------
mIRC - fun for all the family (except grandma and grandpa)
Re: vars #58691 02/11/03 04:45 AM
Joined: May 2003
Posts: 161
A
Ashkrynt Offline
Vogon poet
Offline
Vogon poet
A
Joined: May 2003
Posts: 161
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.

Last edited by Ashkrynt; 02/11/03 04:46 AM.
Re: vars #58692 02/11/03 04:51 AM
Joined: Jul 2003
Posts: 742
MTec89 Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Jul 2003
Posts: 742
mm/dd/yyyy r0x j00r b0x3r5 ;p everything else is non standard IMO


http://MTec89Net.com
irc.freenode.net #MTec89Net
Re: vars #58693 02/11/03 05:44 AM
Joined: Dec 2002
Posts: 1,527
_
_D3m0n_ Offline
Hoopy frood
Offline
Hoopy frood
_
Joined: Dec 2002
Posts: 1,527
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.


D3m0nnet.com
Re: vars #58694 02/11/03 07:01 AM
Joined: May 2003
Posts: 2,265
P
pheonix Offline
Hoopy frood
Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
it's what you're used to i suppose, the idea of mm/dd/yy sounds idiotic to me.


new username: tidy_trax
Re: vars #58695 02/11/03 07:09 AM
Joined: Jul 2003
Posts: 742
MTec89 Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Jul 2003
Posts: 742
i have known mm/dd/yyyy all my life and im used to it.


http://MTec89Net.com
irc.freenode.net #MTec89Net