mIRC Home    About    Download    Register    News    Help

Print Thread
Page 2 of 2 1 2
#27692 06/06/03 04:32 AM
Joined: Dec 2002
Posts: 343
D
Pan-dimensional mouse
OP Offline
Pan-dimensional mouse
D
Joined: Dec 2002
Posts: 343
A year is NOT 52 weeks.

#27693 06/06/03 04:45 AM
Joined: Feb 2003
Posts: 2,812
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,812
But it is.


Well. At least I won lunch.
Good philosophy, see good in bad, I like!
#27694 06/06/03 07:20 AM
Joined: Dec 2002
Posts: 343
D
Pan-dimensional mouse
OP Offline
Pan-dimensional mouse
D
Joined: Dec 2002
Posts: 343
Actually, a year is NOT 52 weeks. I don't know where you get that. A year is 52 weeks and 6 hours. A year is 52 weeks and one day. A year is 52 weeks and 2 days. A year is 53 weeks. A year is many things. Too many problems. As for what I suggested before, a week can be converted back into days for those who want them.

The only thing a year is constant on is a solar year. So if he took seconds divided by how many seconds in a solar year, that would be okay, yet it wouldn't serve much purpose since our calendar doesn't work that way.

#27695 06/06/03 07:36 AM
Joined: Feb 2003
Posts: 2,812
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,812
Hours and Seconds cannot jump into Years. They must form whole Minutes and whole Hours and whole Days and whole Weeks, before they can become Years. At least, that's how $duration works. As I said, after 365 weeks, the 'leap week' can be taken into consideration, and most likely wouldn't have much significants to anyone. I don't care if the year had a blue moon or solar eclipse in it, I just care about turning '52' into a '1' and '104' into a '2' so it reads better.

- Raccoon


Well. At least I won lunch.
Good philosophy, see good in bad, I like!
#27696 06/06/03 10:41 PM
Joined: Dec 2002
Posts: 343
D
Pan-dimensional mouse
OP Offline
Pan-dimensional mouse
D
Joined: Dec 2002
Posts: 343
Maybe it should work like this. Cause I'd hate it like that. I hope I did the below correctly. I used $int not $round, for the reason that we shouldn't round up since it's not actually that duration yet.

$duration(192891822) would return 318wks 6days 13hrs 3mins 42secs

$duration(192891822,2) would return 318wks 6days 13hrs 3mins

$duration(192891822,3) would return 2232days 13hrs 3mins 42secs

$duration(192891822,4) would return 2232days 13hrs 3mins

$duration(192891822,5) would return 6yrs 5wks 6days 2hrs 11mins 10secs

$duration(192891822,6) would return 6yrs 5wks 6days 2hrs 11mins

----
Some of my work I used below.
//echo -s $duration(192891822) $duration($int($calc((192891822/(365.24219*60*60*24) - 6) * (365.24219*60*60*24))))
----
I'd like it with solar years, since no matter how long it is, it will eventually end up going off to solar years.

#27697 08/06/03 12:45 AM
Joined: Jan 2003
Posts: 154
B
Vogon poet
Offline
Vogon poet
B
Joined: Jan 2003
Posts: 154
For most intents and purposes, who cares about the 1/4th of a day for every 365 days? Even if it is never included in the script, it won't make much of a difference..

Come on guys.. There's this little something called "diminishing returns", where as a number grows larger (positively or negatively), additional numbers added or subtracted from it become less and less valueable towards the significance of the number. For example: If someone sees "you've been running this script for 1 day 5 hours and 20 seconds". Then they see "You've been running this script for 200 days 4 hours and 47 seconds", that is quite a difference and it is noticeable. If the script says "You've been running this script for 4 years 147 days 13 hours and 13 seconds" and it's off by 1 day, does that really matter? (even more importantly, would the person notice that the script didn't subtract the extra day?) I doubt anyone is going to run the dang script for 4 years anyways. lol

Why argue about things that are so trivial? 52 weeks is about a year, and if it is just an option to include years instead of amassing weeks, why not?

Khaled should debate an issue that is more useful, not one that'll make a days difference every 4 years for some script.

For the rare occasion when someone NEEDS it to be exact, they can script it.. I don't see why that's really that hard. The person could just simply go with the format as it is now, using weeks as their main unit of measurement.


- Wherever you go there you are.[color:lightgreen]
#27698 08/06/03 01:42 AM
Joined: Dec 2002
Posts: 343
D
Pan-dimensional mouse
OP Offline
Pan-dimensional mouse
D
Joined: Dec 2002
Posts: 343
A year is NOT 52 weeks though. If Khaled did do it, it should simple be done with solar years, since that will always be accurate. With what you said, you are claiming inaccuracy is a good thing.

#27699 08/06/03 04:29 AM
Joined: Feb 2003
Posts: 2,812
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,812
Google says that 2800 websources agree, "there are 52 weeks in a year".
Only one lonely page suggests that "there are NOT 52 weeks in a year".

And incidentally, that one page tells us to ignore that a year is slightly longer than 52 weeks, because in the end, the information is trivial for the effort put into figuring it out.

- Raccoon


Well. At least I won lunch.
Good philosophy, see good in bad, I like!
#27700 08/06/03 04:49 AM
Joined: Dec 2002
Posts: 2,809
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 2,809
You're right, they could script that, so why can't someone who needs years, just script that? It's not exactly hard to do.

Code:
alias yrsduration {
  var %dur = $duration($1)
  tokenize 32 %dur
  if (wk !isin $1) return %dur
  var %weeks = $calc($1)
  var %years = $int($calc(%weeks / 52))
  %weeks = $calc(%weeks % 52)
  var %output
  if (%years) %output = %years $+ $iif(%years > 1,yrs,yr)
  if (%weeks) %output = %output %weeks $+ $iif(%weeks > 1,wks,wk)
  return %output $2-
}


Is that so terribly hard to do that it must be added directly into mIRC?

#27701 08/06/03 04:58 AM
Joined: Dec 2002
Posts: 343
D
Pan-dimensional mouse
OP Offline
Pan-dimensional mouse
D
Joined: Dec 2002
Posts: 343
Well, I originally had this post for changing weeks into days, since thats something everyone can agree on. Since one week is always 7 days, plain and simple. I'm going to just drop the subject of years, since this is too opinionated.

#27702 08/06/03 05:10 AM
Joined: Dec 2002
Posts: 2,809
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 2,809
Well what about something like "I turn 21 in 2yrs 2days 4hours"
If I change that "2days" into "3days" well now it's no longer correct seeing as how I just changed the day on which I was born. For some purposes it is insignifigant, for others it is very signifigant.

Page 2 of 2 1 2

Link Copied to Clipboard