mIRC Homepage
Posted By: greeny $duration enhancement - 25/07/04 08:33 PM
I know this can be scripted, but month and year support for $duration would be very welcome.
Posted By: landonsandor Re: $duration enhancement - 25/07/04 09:07 PM
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.
Posted By: Danthemandoo Re: $duration enhancement - 25/07/04 09:30 PM
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.
Posted By: greeny Re: $duration enhancement - 25/07/04 09:34 PM
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.
Posted By: Seifer Re: $duration enhancement - 25/07/04 11:01 PM
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
Posted By: landonsandor Re: $duration enhancement - 26/07/04 11:09 AM
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.
Posted By: Seifer Re: $duration enhancement - 26/07/04 12:19 PM
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.
Posted By: landonsandor Re: $duration enhancement - 26/07/04 04:15 PM
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)
Posted By: Coolkill Re: $duration enhancement - 26/07/04 09:54 PM
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.
Posted By: KingTomato Re: $duration enhancement - 31/07/04 06:21 PM
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))
© mIRC Discussion Forums