423,688 Members | 2,526 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 423,688 IT Pros & Developers. It's quick & easy.

Question Concerning Date Function Range

P: n/a
After reading section 15.9.1.1 the ECMAScript Language Specifications I
see that the date range for the Date function is +/- 100,000,000 days
from 01 Jan 1970. This is called an extrapolated Gregorian calendar.
Since the Gregorian calendar did not begin until 15 Oct 1582 what is
the purpose of dates before that date? Wouldn't any computation prior
to that date be meaningless or am I missing something?

The reason I ask is that I have created a date calculator at my web
site. I don't want it to do computations with dates that have no
meaning.

Columbus discovered america on 12 Oct 1492. This must have been with
the Julian Calendar. If I used the Date function to see how many days
it was from that date until now would it be correct?

--
Dennis M. Marks
http://www.dcs-chico.com/~denmarks/
Replace domain.invalid with dcsi.net
-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----
Jul 23 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
JRS: In article <14*************************@domain.invalid>, seen in
news:comp.lang.javascript, Dennis M. Marks <de******@domain.invalid>
posted at Wed, 14 Apr 2004 17:42:43 :
After reading section 15.9.1.1 the ECMAScript Language Specifications I
see that the date range for the Date function is +/- 100,000,000 days
from 01 Jan 1970.
And if you read it more carefully, you will find that it is from
1970-01-01 00:00:00 *UTC*. It is important to remember that the
millisecond count is Greenwich-based.

Since the Gregorian calendar did not begin until 15 Oct 1582 what is
the purpose of dates before that date? Wouldn't any computation prior
to that date be meaningless or am I missing something?
Yes; to the latter. The proleptic Gregorian calendar refers in present
terms to dates before the relevant Julian-Gregorian transition; the
Julian calendar refers to the terms used at the time - though one should
be aware of the difference between O.S. and N.S. dating. It is easier
to calculate with a single, consistent, non-saltatory calendar. The
Julian Calendar is needed only for work dealing with ancient records.

Scaliger chose BC 4713-01-01 noon to start his day-count : on the
proleptic Julian Calendar, of course, as Caesar was at that time minus
four-and-a-half millennia old. Archbishop Ussher of Armagh likewise
calculated the date of the Creation in Julian, likewise proleptic.

All B.C. dates, indeed all dates up to about A.D. 525 and most dates for
a while thereafter, are proleptic. Indeed, it's hard to think of a date
or day scale whose origin is not proleptic.

The reason I ask is that I have created a date calculator at my web
site. I don't want it to do computations with dates that have no
meaning.

Columbus discovered america on 12 Oct 1492.
He did not. He reached an outlying part of the American continents; it
was Friday 1492-10-21 proleptic Gregorian. BTW, Zeller correctly
describes the event as the discovery of the new world, or as a landing;
he does not use the word Amerika (and would not have had a word to use
in the 1883 paper).

This must have been with
the Julian Calendar. If I used the Date function to see how many days
it was from that date until now would it be correct?


One cannot predict what results you might produce; but as-distributed
javascript takes all dates as Gregorian. It was, currently, 186815 days
ago, making due allowance for the calendar change; MJD -133705 (today is
+53110).

--
John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 MIME.
<URL:http://www.merlyn.demon.co.uk/> TP/BP/Delphi/&c., FAQqy topics & links;
<URL:http://www.merlyn.demon.co.uk/clpb-faq.txt> RAH Prins : c.l.p.b mFAQ;
<URL:ftp://garbo.uwasa.fi/pc/link/tsfaqp.zip> Timo Salmi's Turbo Pascal FAQ.
Jul 23 '05 #2

P: n/a
In article <V1**************@merlyn.demon.co.uk>, Dr John Stockton
<sp**@merlyn.demon.co.uk> wrote:

<snip>
Columbus discovered america on 12 Oct 1492.


He did not. He reached an outlying part of the American continents; it
was Friday 1492-10-21 proleptic Gregorian. BTW, Zeller correctly
describes the event as the discovery of the new world, or as a landing;
he does not use the word Amerika (and would not have had a word to use
in the 1883 paper).

This must have been with
the Julian Calendar. If I used the Date function to see how many days
it was from that date until now would it be correct?


One cannot predict what results you might produce; but as-distributed
javascript takes all dates as Gregorian. It was, currently, 186815 days
ago, making due allowance for the calendar change; MJD -133705 (today is
+53110).


Thank you for your help.

Since Columbus Day is celebrated on 12 Oct (1492) in the U.S. I just
wondered what calendar this date is based on. Do I assume extrapolated
Gregorian?

Is there a year zero in the Gregorian calendar?

--
Dennis M. Marks
http://www.dcs-chico.com/~denmarks/
Replace domain.invalid with dcsi.net
-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----
Jul 23 '05 #3

P: n/a
In article <15*************************@domain.invalid>, Dennis M.
Marks <de******@domain.invalid> wrote:
In article <V1**************@merlyn.demon.co.uk>, Dr John Stockton
<sp**@merlyn.demon.co.uk> wrote:

<snip>
Columbus discovered america on 12 Oct 1492.


He did not. He reached an outlying part of the American continents; it
was Friday 1492-10-21 proleptic Gregorian. BTW, Zeller correctly
describes the event as the discovery of the new world, or as a landing;
he does not use the word Amerika (and would not have had a word to use
in the 1883 paper).

This must have been with
the Julian Calendar. If I used the Date function to see how many days
it was from that date until now would it be correct?


One cannot predict what results you might produce; but as-distributed
javascript takes all dates as Gregorian. It was, currently, 186815 days
ago, making due allowance for the calendar change; MJD -133705 (today is
+53110).


Thank you for your help.

Since Columbus Day is celebrated on 12 Oct (1492) in the U.S. I just
wondered what calendar this date is based on. Do I assume extrapolated
Gregorian?

Is there a year zero in the Gregorian calendar?


More questions (It never ends, does it?)

I have found out that negative years return a B.C. date that is one
year less. -1 returns 2 B.C.

0-99 returns 1900-1999.

How do I enter the actual years 0-99 (where 0 is actually 1 B.C. and 1
is 1 CE or AD)?

--
Dennis M. Marks
http://www.dcs-chico.com/~denmarks/
Replace domain.invalid with dcsi.net
-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----
Jul 23 '05 #4

P: n/a
JRS: In article <15*************************@domain.invalid>, seen in
news:comp.lang.javascript, Dennis M. Marks <de******@domain.invalid>
posted at Thu, 15 Apr 2004 17:29:17 :

Since Columbus Day is celebrated on 12 Oct (1492) in the U.S. I just
wondered what calendar this date is based on. Do I assume extrapolated
Gregorian?
The date 12 Oct 1492 is a Julian date. Historians almost always use a
current date notation. Zeller, for example, uses it as a Julian example
date in three of his papers (and, if he got it wrong the first time, one
can expect that he would have been corrected in time for the last).

The US thus celebrates, on a day which is not an anniversary, an event
which was not the discovery of America.
Is there a year zero in the Gregorian calendar?


The customary notation has 2 BC, 1 BC, 1 AD, 2 AD - which is in proper
accordance with the meanings of BC & AD.

Astronomer's notation has -2, -1, 0, -1, -2.

Both of those can be used with Julian and Gregorian.

AISB, see below.

--
John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 MIME.
Web <URL:http://www.merlyn.demon.co.uk/> - w. FAQish topics, links, acronyms
PAS EXE etc : <URL:http://www.merlyn.demon.co.uk/programs/> - see 00index.htm
Dates - miscdate.htm moredate.htm js-dates.htm pas-time.htm critdate.htm etc.
Jul 23 '05 #5

P: n/a
JRS: In article <15*************************@domain.invalid>, seen in
news:comp.lang.javascript, Dennis M. Marks <de******@domain.invalid>
posted at Thu, 15 Apr 2004 17:55:15 :
More questions (It never ends, does it?)

I have found out that negative years return a B.C. date that is one
year less. -1 returns 2 B.C.
That is well-known; a year denoted solely by a number smaller than 1 can
only be in astronomical notation.

0-99 returns 1900-1999.
That is because primitive Californian(?) programmers, back in the mists
of time probably before some here were born, did not foresee that there
might be time after the year '99 (even though it had already happened
once in that State).

It would have been far better to implement a primitive new Date which
treated all years straightforwardly, and a new Method to window a date
into a desired 100-year range, absolute or relative to the current year.
How do I enter the actual years 0-99 (where 0 is actually 1 B.C. and 1
is 1 CE or AD)?


If you were to read the FAQ on the subject of dates, you would know how
to find that out; see sig. below.

One way is to add 100 to the year and subtract 1200 from the month.

A better is to use
D = new Date(0) // if needed
D.setHours(0,0,0,0)
D.setFullYear(Y, M-1, D)

However, thought may be needed about what happens, in Spring and in
Autumn, if the seasonal clock change involves Y-M-D 00:00:00, local
time. Anyone from the Azores or East Greenland reading this?

--
John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 IE 4
<URL:http://jibbering.com/faq/> Jim Ley's FAQ for news:comp.lang.javascript
<URL:http://www.merlyn.demon.co.uk/js-index.htm> jscr maths, dates, sources.
<URL:http://www.merlyn.demon.co.uk/> TP/BP/Delphi/jscr/&c, FAQ items, links.
Jul 23 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.