Re: weekcalc.htm, was: Re: newbie: problem in simple function



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>,
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:
In comp.lang.javascript message <koednU_tB-oYVfva4p2dnAA@xxxxxxxxxxxx>,
Mon, 17 Dec 2007 14:05:50, Randy Webb <HikksNotAtHome@xxxxxxx> posted:
Evertjan. said the following on 12/17/2007 2:00 PM:
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,
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.
Could you give the exact url, I cannot find it here:
<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?
Read my <weekinfo.htm> or any reputable EU/NL diary.
Incomplete URL.
It's not a URL at all. But the clause gives a sufficient
indication.
Yeah, everybody that might ever read your posts will know exactly where
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.

Depends 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.
If weeks are limited to a period that includes the beginning *and* end
day of the "week", then there will never be a week 53 and very seldom a
week 52.
Firstly, that's not true;
Based on what I wrote, it is *very* true. Can you tell me what day of
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 in
between; and a Week 53 occurs after 17.75% of Weeks 52.
Nobody said anything about an "ISO week". Read what I wrote again. Try
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/
.



Relevant Pages

  • Re: weekcalc.htm, was: Re: newbie: problem in simple function
    ... then there will be up to 54 week numbers in a calendar year. ... Nobody said anything about an "ISO week". ... American, and therefore any such reference, unqualified, should be ... American references to Week Number need to ...
    (comp.lang.javascript)
  • Re: Programs without semicolon
    ... > A reference to a section in the standards to substantiate ... > ISO Section 5.1.2.2.3#1 starts as follows: ...
    (comp.lang.c)
  • Re: What was it all about?
    ... Does anybody know what the hearings were all about? ... Any link or reference? ... Do you know or has heard of any IRS employee who was convicted for filing ... Is that called a fraudulent return? ...
    (misc.taxes)
  • Re: 32x32 and 64x64 signed integer multiplication
    ... >> haven't found any good descriptions for the signed counterpart. ... >> Does any of you have a good reference for this topic? ... towards algorithms and a request for links (rather than discussing ISO ... C directly), nonetheless, this response isn't exactly constructive. ...
    (comp.lang.c)
  • Re: mkisofs
    ... >Looking through this reference at docs.sun.com, ... >How to Create an ISO 9660 File System for a Data CD or DVD ...
    (comp.unix.solaris)

Loading