mIRC Home    About    Download    Register    News    Help

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

#58686 01/11/03 06:54 PM
Joined: Mar 2003
Posts: 1,256
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Mar 2003
Posts: 1,256
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)

#58687 01/11/03 07:03 PM
Joined: Jul 2003
Posts: 733
M
MTec89 Offline OP
Hoopy frood
OP Offline
Hoopy frood
M
Joined: Jul 2003
Posts: 733
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

#58688 01/11/03 10:40 PM
Z
zfr
zfr
Z
use $adate to get american style dates.

#58689 01/11/03 11:26 PM
P
pheonix
pheonix
P
shocked i thought americans used the same date format as england: day/month/year

#58690 02/11/03 02:15 AM
Joined: Apr 2003
Posts: 426
N
Fjord artisan
Offline
Fjord artisan
N
Joined: Apr 2003
Posts: 426
No. Americans use Month/Day/Year.

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

Silly country.

#58691 02/11/03 04:45 AM
Joined: May 2003
Posts: 161
A
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.
#58692 02/11/03 04:51 AM
Joined: Jul 2003
Posts: 733
M
MTec89 Offline OP
Hoopy frood
OP Offline
Hoopy frood
M
Joined: Jul 2003
Posts: 733
mm/dd/yyyy r0x j00r b0x3r5 ;p everything else is non standard IMO

#58693 02/11/03 05:44 AM
Joined: Dec 2002
Posts: 1,518
_
Hoopy frood
Offline
Hoopy frood
_
Joined: Dec 2002
Posts: 1,518
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.

#58694 02/11/03 07:01 AM
P
pheonix
pheonix
P
it's what you're used to i suppose, the idea of mm/dd/yy sounds idiotic to me.

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


Link Copied to Clipboard