469,927 Members | 2,036 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,927 developers. It's quick & easy.

More Date Stuff

I've been updating by date stuff at my web site using much of the
information obtained here. Would you please check it for any errors.

The two pages are "Yearly Calendar" and "Date Calculator".
There is no year validation on the "Yearly Calendar" but it is only
correct for years 1 and up. There is full validation in the "Date
Calculator" but I limited the dates to years 1-9999.

I did not allow years before the year 1 since I am still confused about
leap year calculation for B.C. dates.

--
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 1474
JRS: In article <20*************************@domain.invalid>, seen in
news:comp.lang.javascript, Dennis M. Marks <de******@domain.invalid>
posted at Tue, 20 Apr 2004 15:08:34 :
I've been updating by date stuff at my web site using much of the
information obtained here. Would you please check it for any errors.

The two pages are "Yearly Calendar" and "Date Calculator".
There is no year validation on the "Yearly Calendar" but it is only
correct for years 1 and up. There is full validation in the "Date
Calculator" but I limited the dates to years 1-9999.

I did not allow years before the year 1 since I am still confused about
leap year calculation for B.C. dates.


Read "The Calendar FAQ", linked from my site.

In the proleptic Gregorian astronomical calendar, the same rules apply
throughout. But one must allow for, or prevent, the different behaviour
of the % operator with a negative argument. Similarly for the quasi-
proleptic Julian.

Convert between astronomical and Christian by adding/subtracting 1 for
year numbers before Year 1.

For the civil calendar, you can allow for the Julian-Gregorian change,
varying with locality; the change from Roman to Arabic numerals; the
change from AUC to AD dates; the miscalculations affecting 45BC..4AD;
the Year of Confusion, etc.

Then there is the matter of Sweden 1700-1712, Alaska 1867, and other
more recent funny goings-on in the Pacific.

--
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 #2
Dennis M. Marks wrote:
I've been updating by date stuff at my web site using much of the
information obtained here. Would you please check it for any errors.

The two pages are "Yearly Calendar" and "Date Calculator".
There is no year validation on the "Yearly Calendar" but it is only
correct for years 1 and up. There is full validation in the "Date
Calculator" but I limited the dates to years 1-9999.

I did not allow years before the year 1 since I am still confused about
leap year calculation for B.C. dates.


Date calculator doesn't work in Mac Safari 1.1, interesting, though.
Mick

http://www.mickweb.com/javascript/arrays/oopsCal.html
Jul 23 '05 #3
In article <v8******************@twister.nyroc.rr.com>, Mick White
<mw******@rochester.rr.com> wrote:
Date calculator doesn't work in Mac Safari 1.1, interesting, though.
Mick


Please explain the error. I do not have Safari.

--
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
In article <E$**************@merlyn.demon.co.uk>, Dr John Stockton
<sp**@merlyn.demon.co.uk> wrote:
In the proleptic Gregorian astronomical calendar, the same rules apply
throughout. But one must allow for, or prevent, the different behaviour
of the % operator with a negative argument. Similarly for the quasi-
proleptic Julian.


The year 4AD is a leap year. From there the years are 3AD 2AD 1AD 1BC
2BC 3BC 4BC etc. No year 0 in Gregorian Calendar.

Is 4BC a leap year or is it 1BC(0 astrom) and 5BC(-4 astrom)? Maybe 1BC
wouldn't be a leap year due to century rule or maybe it is a leap year
due to the 400 year rule.

--
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 #5
JRS: In article <21*************************@domain.invalid>, seen in
news:comp.lang.javascript, Dennis M. Marks <de******@domain.invalid>
posted at Wed, 21 Apr 2004 15:29:55 :
In article <E$**************@merlyn.demon.co.uk>, Dr John Stockton
<sp**@merlyn.demon.co.uk> wrote:
In the proleptic Gregorian astronomical calendar, the same rules apply
throughout. But one must allow for, or prevent, the different behaviour
of the % operator with a negative argument. Similarly for the quasi-
proleptic Julian.
The year 4AD is a leap year. From there the years are 3AD 2AD 1AD 1BC
2BC 3BC 4BC etc. No year 0 in Gregorian Calendar.


You should read the references which have been given to you, and
endeavour to understand what is written there and here. I used the word
"astronomical" for a purpose; I have already referred to it in this
thread. There is no year in the gap below; there is no 0 AD nor 0 BC,
but there is a Year 0.
3 BC 2 BC 1 BC 1 AD 2 AD 3 AD common
-2 -1 0 +1 +2 +3 astro
DCCLI DCCLII DCCLIII DCCLIV DCCLV DCCLVI actual

On the proleptic Gregorian calendar, 4 AD is leap.
On the proleptic Gregorian astronomical calendar, +4 is leap.
On the proleptic Julian calendar, 4 AD is leap.
On the proleptic Julian astronomical calendar, +4 is leap.
On the actual calendar of the time, DCCLVII AUC ought to have been Leap;
but, in fact, it was not.
All of those refer to the same physical year, but with a 2 physical day
shift between Gregorian & Julian.
Is 4BC a leap year or is it 1BC(0 astrom) and 5BC(-4 astrom)? Maybe 1BC
wouldn't be a leap year due to century rule or maybe it is a leap year
due to the 400 year rule.


4 BC is astronomical year -3; it is not Leap, on both proleptic
calendars. Actually, it should probably not have been Leap; it also was
not Leap, but for a different reason.

5 BC is astronomical year -4; it is Leap, on both proleptic calendars.
Actually, it should probably have been Leap; but it also was not Leap,
for the same reason.

1 BC is astronomical year 0; it is Leap, on both proleptic calendars,
like 2000. Actually, it should probably have been Leap; it also was not
Leap, for the same reason.
Javascript does not need to store the year in a Date Object, but a
millisecond count. When handling the year as a type Number, the
proleptic astronomical Gregorian calendar is used. when handling the
year as part of a string, the proleptic non-astronomical Gregorian
calendar is used.

This is in accordance with a famous, but perhaps mythical, statement by
Winston Churchill, although the situation is as yet incomplete

--
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 #6

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Wayne | last post: by
2 posts views Thread by hph | last post: by
38 posts views Thread by sopranos2 | last post: by
8 posts views Thread by john | last post: by
1 post views Thread by Matt | last post: by
imarkdesigns
14 posts views Thread by imarkdesigns | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.