mIRC Home    About    Download    Register    News    Help

Topic Options
#91721 - 25/07/04 09:33 PM $duration enhancement
greeny Offline
Fjord artisan

Registered: 09/12/02
Posts: 230
I know this can be scripted, but month and year support for $duration would be very welcome.

Top
#91722 - 25/07/04 10:07 PM Re: $duration enhancement
landonsandor Offline
Hoopy frood

Registered: 12/12/02
Posts: 1527
Loc: state of confusion
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

Top
#91723 - 25/07/04 10:30 PM Re: $duration enhancement
Danthemandoo Offline
Fjord artisan

Registered: 04/03/04
Posts: 457
Loc: Behind you
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.

Top
#91724 - 25/07/04 10:34 PM Re: $duration enhancement
greeny Offline
Fjord artisan

Registered: 09/12/02
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.

Top
#91725 - 26/07/04 12:01 AM Re: $duration enhancement
Seifer Offline
Fjord artisan

Registered: 11/11/03
Posts: 228
Loc: Melbourne, Australia
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

Top
#91726 - 26/07/04 12:09 PM Re: $duration enhancement
landonsandor Offline
Hoopy frood

Registered: 12/12/02
Posts: 1527
Loc: state of confusion
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

Top
#91727 - 26/07/04 01:19 PM Re: $duration enhancement
Seifer Offline
Fjord artisan

Registered: 11/11/03
Posts: 228
Loc: Melbourne, Australia
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.

Top
#91728 - 26/07/04 05:15 PM Re: $duration enhancement
landonsandor Offline
Hoopy frood

Registered: 12/12/02
Posts: 1527
Loc: state of confusion
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

Top
#91729 - 26/07/04 10:54 PM Re: $duration enhancement
Coolkill Offline
Hoopy frood

Registered: 09/12/02
Posts: 788
Loc: Wales, United Kingdom.
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.

Top
#91730 - 31/07/04 07:21 PM Re: $duration enhancement
KingTomato Offline
Planetary brain

Registered: 04/01/03
Posts: 3012
Loc: New Hampshire, USA
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

Top