Re: weekcalc.htm, was: Re: newbie: problem in simple function
- From: Randy Webb <HikksNotAtHome@xxxxxxx>
- Date: Thu, 20 Dec 2007 21:17:29 -0500
Dr J R Stockton said the following on 12/20/2007 7:29 AM:
In comp.lang.javascript message <gsWdnazo2sOnAPTa4p2dnAA@xxxxxxxxxxxx>,
Wed, 19 Dec 2007 17:37:43, Randy Webb <HikksNotAtHome@xxxxxxx> posted:
Dr J R Stockton said the following on 12/19/2007 9:48 AM:In comp.lang.javascript message <S4adnZxLuLgjz_Xa4p2dnAA@xxxxxxxxxxxx>,Yeah, everybody that might ever read your posts will know exactly where
Tue, 18 Dec 2007 18:07:53, Randy Webb <HikksNotAtHome@xxxxxxx> posted:
Dr J R Stockton said the following on 12/18/2007 7:55 AM:It's not a URL at all. But the clause gives a sufficientIn comp.lang.javascript message <koednU_tB-oYVfva4p2dnAA@xxxxxxxxxxxx>,Incomplete URL.
Mon, 17 Dec 2007 14:05:50, Randy Webb <HikksNotAtHome@xxxxxxx> posted:
Evertjan. said the following on 12/17/2007 2:00 PM:Read my <weekinfo.htm> or any reputable EU/NL diary.Dr J R Stockton wrote on 17 dec 2007 in comp.lang.javascript:
FYI, there's a brand new Week Number algorithm in my weekcalc.htm,Could you give the exact url, I cannot find it here:
not
using a Date Object. In IE6, it's a little slower than with an Object,
but it could be optimised somewhat. ... Now a little faster.
<http://www.merlyn.demon.co.uk/weekcalc.htm#JS>
===============
Just a few weeks ago I did a quicky in ASP-vbs,
it seems correct for 2008, but I did not test it further.
Can week 53 exist?
indication.
to find it. Give a complete URL and that becomes a moot point.
I'm only interested in getting intelligent readers, though. Did you not
notice the reference to EU/NL?
Yep, sure did Doc. In order to get intelligent readers, you should act intelligent about it.
Based on what I wrote, it is *very* true. Can you tell me what day ofFirstly, that's not true;If weeks are limited to a period that includes the beginning *and* endDepends on your definition of "week".If weeks are limited to no more than seven days, Weeks 01 to 52 are
inadequate to cover a stream of years of 365 or 366 days; 7*52 = 364.
day of the "week", then there will never be a week 53 and very seldom a
week 52.
the week to put the First of January on to create a calendar that will
have 53 weeks on it based on the criterion I gave? The week must start
on Sunday and end on Saturday. If it doesn't include all 7 of those
days, it is not in that year.
Days not in a year? a strange idea.
I didn't say days in a year, I said "weeks" in a year. But, nothing about the IRS Tax Code isn't "strange".
Then, tell me how many will have 52 weeks and how many years will have
51 weeks. Then, it will become trivial to see if what I wrote was true
or not.
If years have either 51 or 52 weeks, then there must be days that are
not in weeks. Are they weekdays, weekends, or /dies non/?
In the IRS Tax Code for the US, they are not in a "week", they are part of a "partial week" and how salaried employees get paid depends on what a "week" is.
In any week numbering system, either all weeks will be 7 days and for
each year there will be 52 or 53 of them and the week number will, about
6 times out of 7, not change at the end of New Year's Eve; or some week
numbers will refer to weeks with other than 7 days.
If no week is longer than 7 days, and the week number changes at YYYY.0,
then there will be up to 54 week numbers in a calendar year.
But it's not worth discussing the possibilities of weeks chosen either
by or in defiance of local administrations.
Nobody said anything about "local administrations". Try determining, according to the US IRS, how many weeks are in a month, then how many are in a year.
ISO weeks include both Mon & Sun and 5 days inNobody said anything about an "ISO week". Read what I wrote again. Try
between; and a Week 53 occurs after 17.75% of Weeks 52.
to understand it this time.
I introduced the topic of Week Number. As you know, I am not an
American, and therefore any such reference, unqualified, should be
presumed to be to ISO ones. American references to Week Number need to
specify the type exactly, because sometimes they will mean ISO and
sometimes they will mean one of a considerable number of other
possibilities, as described in my <week????.htm>.
FMI, what authoritative definitions of Week Number are currently in use
in the USA? FYI, the UK uses both ISO and Tax weeks, /loc cit/.
The IRS has so many definitions of a week that I stopped trying to figure out how many there were. I am not even sure the IRS itself knows. Perfect Catch-22 implemented by some absent minded politician.
--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
.
- Follow-Ups:
- Re: weekcalc.htm, was: Re: newbie: problem in simple function
- From: Dr J R Stockton
- Re: weekcalc.htm, was: Re: newbie: problem in simple function
- References:
- Re: newbie: problem in simple function
- From: Dr J R Stockton
- weekcalc.htm, was: Re: newbie: problem in simple function
- From: Evertjan.
- Re: weekcalc.htm, was: Re: newbie: problem in simple function
- From: Randy Webb
- Re: weekcalc.htm, was: Re: newbie: problem in simple function
- From: Dr J R Stockton
- Re: weekcalc.htm, was: Re: newbie: problem in simple function
- From: Randy Webb
- Re: weekcalc.htm, was: Re: newbie: problem in simple function
- From: Dr J R Stockton
- Re: weekcalc.htm, was: Re: newbie: problem in simple function
- From: Randy Webb
- Re: weekcalc.htm, was: Re: newbie: problem in simple function
- From: Dr J R Stockton
- Re: newbie: problem in simple function
- Prev by Date: Re: Datejs - A JavaScript Date Library
- Next by Date: Re: How to get all images in a div
- Previous by thread: Re: weekcalc.htm, was: Re: newbie: problem in simple function
- Next by thread: Re: weekcalc.htm, was: Re: newbie: problem in simple function
- Index(es):
Relevant Pages
|
Loading