From: Eustace on
On 2010-03-04 12:21 Dr J R Stockton wrote:
> In comp.lang.javascript message <hmlck5$pi6$1(a)speranza.aioe.org>, Wed, 3
> Mar 2010 05:11:11, Eustace <emfril(a)gmail.ccom> posted:
>> emf
>>
>> --
>> Date Calculator with all-purpose JS code
>> https://files.nyu.edu/emf202/public/js/datecalc.html
>
> Since it does not offer Week-Numbering Dates, Ordinal Dates, the Date of
> Easter, or the dates in any non-Gregorian calendar, ISTM that the claim
> of "all-purpose" is considerably exaggerated.

All-purpose only implies being able to be used in languages where a Date
Object or whenever it is for whatever reason undesirable.

> The code in datecalc.js nowhere uses "new" : it takes no advantage of
> the JavaScript Date Object, and could have been converted from some
> simpler language.
>
> The name "julianDate" is semantically incorrect; you should use
> "ordinalDate". Don't copy IBM.

It was suggested to me by my mentor (after I had taken a 1 credit class
in Basic at a Community College many years ago). Since then I have
become aware that it was not accurate... Now I know where he got it from.

> function isValid(yyyy, mm, dd) can more briefly be done with a Date
> Object, as often discussed here in the past.
>
> function absoluteDate(yyyy, mm, dd) can more briefly be done with a
> Date Object, using new Date(Date.UTC(yyyy, mm, dd)) .
>
> function gregorianDate(absDate) can more briefly be done with a Date
> Object, using UTC.
>
> <https://files.nyu.edu/emf202/public/js/datecalc.js> may be damaged ;
> the last visible character in it is apparently '{'

I am grateful for the observation.

> The newsgroup FAQ used to have something helpful about general date/time
> coding in JavaScript.
>
> I suggest that you change your signature.
>
> It's a good idea to read the newsgroup c.l.j and its FAQ. See below.

I still find my functions a simpler alternative for general purposes
when hours etc. are not involved.

emf

--
Date Calculator with all-purpose JS code
https://files.nyu.edu/emf202/public/js/datecalc.html
From: Joe D Williams on
>>>> How can I make a link open in the whole window?

isn't that what attribute seamless should do in the html5 iframe spec?
Best Regards,
Joe