473,763 Members | 3,712 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Question Concerning Date Function Range

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
5 2437
JRS: In article <14************ *************@d omain.invalid>, seen in
news:comp.lang. javascript, Dennis M. Marks <de******@domai n.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.demo n.co.uk/> TP/BP/Delphi/&c., FAQqy topics & links;
<URL:http://www.merlyn.demo n.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
In article <V1************ **@merlyn.demon .co.uk>, Dr John Stockton
<sp**@merlyn.de mon.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
In article <15************ *************@d omain.invalid>, Dennis M.
Marks <de******@domai n.invalid> wrote:
In article <V1************ **@merlyn.demon .co.uk>, Dr John Stockton
<sp**@merlyn.de mon.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
JRS: In article <15************ *************@d omain.invalid>, seen in
news:comp.lang. javascript, Dennis M. Marks <de******@domai n.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.demo n.co.uk/> - w. FAQish topics, links, acronyms
PAS EXE etc : <URL:http://www.merlyn.demo n.co.uk/programs/> - see 00index.htm
Dates - miscdate.htm moredate.htm js-dates.htm pas-time.htm critdate.htm etc.
Jul 23 '05 #5
JRS: In article <15************ *************@d omain.invalid>, seen in
news:comp.lang. javascript, Dennis M. Marks <de******@domai n.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 straightforward ly, 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.demo n.co.uk/js-index.htm> jscr maths, dates, sources.
<URL:http://www.merlyn.demo n.co.uk/> TP/BP/Delphi/jscr/&c, FAQ items, links.
Jul 23 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
5219
by: androtech | last post by:
Hello, I'm looking for a function that returns a date range for a specified week number of the year. I'm not able to find functions like this anywhere. Any pointers/help would be much appreciated. TIA
8
2672
by: peashoe | last post by:
I have an asp page that uses a calendar.js (pop-up) file to add an exact date format in the text field (txtDDate). My problem is I need some javascript that sets an alert that does not allow them to select today. example: var dtToday = Date() if(document.frmSoftware.txtDDate.value == dtToday) {
4
22690
by: Mark | last post by:
Hi I have been trying to convert the week number to a range of dates that I can use. It should be fairly simple for you guru's out there but for us mere mortals it is beyond our grasp. I know that there are different start days of the week so I would presume any function would provide that facility. Hope you can help Mark
1
1675
by: Mike Cooper | last post by:
Hi everyone, This is a tough one. I have a database full of solicitations, identifying a customer and recording initial call, first followup, second followup, etc. My boss want to be able to generate a report showing a list of customer who were call between two different dates that he types into a form. That, I have done. My boss types in his two dates, the SQL statement searches through the follow-up call fields for a date
1
2389
by: MLH | last post by:
In an Access 97 form, I have a textbox control with the following code that runs AfterUpdate... Option Compare Database Option Explicit Private Sub UNIXdate_AfterUpdate() Me!RealDate = DateAdd("s", , #1/1/1970#) End Sub
21
3221
by: yeti349 | last post by:
Hi, I'm using the following code to retrieve data from an xml file and populate a javascript array. The data is then displayed in html table form. I would like to then be able to sort by each column. Once the array elements are split, what is the best way to sort them? Thank you. //populate data object with data from xml file. //Data is a comma delimited list of values var jsData = new Array(); jsData = {lib: "#field...
18
38246
by: dfetrow410 | last post by:
Anyone have some code that will do this? Dave
3
2337
by: Deano | last post by:
The short version; In short, given one date range (start and end dates) how can I find the period that overlaps with another date range? The long version; I have knocked up a little application that helps my friend monitor employee absences. You can enter the start and end dates of an absence. For reports the user specifies start and end dates which produces a list of people with absences
5
1002
by: Robocop | last post by:
Is it possible to do something like this syntactically: year = '2008' month = '09' limit = '31' for i in range(1,limit): temp = Table.objects.filter(date = year'-'month'-'i) <----screwed up syntax ...do something with temp return
0
9563
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10145
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9998
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9938
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
5270
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5406
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3917
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3523
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2793
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.