mIRC Home    About    Download    Register    News    Help

Print Thread
$duration enhancement #91721 25/07/04 08:33 PM
Joined: Dec 2002
Posts: 230
G
greeny Offline OP
Fjord artisan
OP Offline
Fjord artisan
G
Joined: Dec 2002
Posts: 230
I know this can be scripted, but month and year support for $duration would be very welcome.

Re: $duration enhancement #91722 25/07/04 09:07 PM
Joined: Dec 2002
Posts: 1,527
L
landonsandor Offline
Hoopy frood
Offline
Hoopy frood
L
Joined: Dec 2002
Posts: 1,527
The only problem with this as mentioned before is that not every month in the callendar (SP?) has the same amount of days. Im not AGAINST this idea, but I understand why it wouldnt be done. If all months were uniform, then it could be done a lot easier.


Those who fail history are doomed to repeat it
Re: $duration enhancement #91723 25/07/04 09:30 PM
Joined: Mar 2004
Posts: 457
D
Danthemandoo Offline
Fjord artisan
Offline
Fjord artisan
D
Joined: Mar 2004
Posts: 457
i think a month is uniformly acknowledged as being 4 weeks, so i don't see the problem personally. As long as mIRC calculates the months and years by using weeks, it should be fine.
7 days = a week
4 weeks = a month
52 weeks = a year

Would be nice to see this since i had to script an alternative which isn't perfect.

Re: $duration enhancement #91724 25/07/04 09:34 PM
Joined: Dec 2002
Posts: 230
G
greeny Offline OP
Fjord artisan
OP Offline
Fjord artisan
G
Joined: Dec 2002
Posts: 230
I agree with you both to a certain extent - Khaled could introduce a property for $duration (like $duration().years) if he doesn't want to change the default behaviour though.

Re: $duration enhancement #91725 25/07/04 11:01 PM
Joined: Nov 2003
Posts: 228
S
Seifer Offline
Fjord artisan
Offline
Fjord artisan
S
Joined: Nov 2003
Posts: 228
The problem with calculating it like that is that there will end up being 13 months for every year. I think that it's better off using days: 30 days = 1 month

Re: $duration enhancement #91726 26/07/04 11:09 AM
Joined: Dec 2002
Posts: 1,527
L
landonsandor Offline
Hoopy frood
Offline
Hoopy frood
L
Joined: Dec 2002
Posts: 1,527
A month is NOT always 4 weeks. 4 weeks * 7 days = 28 days. What about:

Jan (31 days) - missing 3
Feb (the only month to match this - except once every 4 years)
March (31 days) - missing 3
April (30 days) - missing 2
May (31 days) - missing 3
June (30 days) - missing 2
July (31 days) - missing 3
August (31 days) - missing 3
September (30 days) - missing 2
October (31 days) - missing 3
November (30 days) - missing 2
December (31 days) - missing 3

Total of missing days:

3 + 3 + 2 + 3 + 2 + 3 + 3 + 2 + 3 + 2 + 3 = 29

If you can get the world to use a 30 day month in its calendar then and only then will you be able to use a real and true uniform system for this and yes, I AM aware that SOME calendars in use DO go by the 30 day/month system.


Those who fail history are doomed to repeat it
Re: $duration enhancement #91727 26/07/04 12:19 PM
Joined: Nov 2003
Posts: 228
S
Seifer Offline
Fjord artisan
Offline
Fjord artisan
S
Joined: Nov 2003
Posts: 228
Which is why I suggested 30 day months rather than using weeks. At least that way it'll only be 5 days off (6 at most) rather than being 1 month off.

Re: $duration enhancement #91728 26/07/04 04:15 PM
Joined: Dec 2002
Posts: 1,527
L
landonsandor Offline
Hoopy frood
Offline
Hoopy frood
L
Joined: Dec 2002
Posts: 1,527
yes, but even then it wont be truely accurate UNLESS you called it a lunar month duration setting (which correct me if Im wrong is a 30 day cycle). If that's a correct statement then yes, your idea of 30 days would be valid, but I can see people complaining that it's not a TRUE system (even tho I'd love to see $duration extended out personally)


Those who fail history are doomed to repeat it
Re: $duration enhancement #91729 26/07/04 09:54 PM
Joined: Dec 2002
Posts: 788
C
Coolkill Offline
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 788
Who really cares how many days are in a month, its widely known there are 4 weeks in a month, so, 2 months = 8 weeks.

Since $duration is obviously only used for finding the duration of something in seconds, it wont exactly matter if it varies.

Your valid arguements above are most likely why $duration does not support this feature.

Eamonn.

Re: $duration enhancement #91730 31/07/04 06:21 PM
Joined: Jan 2003
Posts: 3,012
KingTomato Offline
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
as was mentioned before, 12 * 4 != 52. You're left a few weeks short, which would kill the script completly. I personally don't want to see months, but would like years. The only thing though, is have years rounded to days (365), or get picky and make it hours (24 * 365 + 6 (~365.25 days in a year))


-KingTomato