Qbasicnews.com
May 25, 2020, 10:59:54 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Back to Qbasicnews.com | QB Online Help | FAQ | Chat | All Basic Code | QB Knowledge Base
 
   Home   Help Search Login Register  
Pages: 1 [2]
  Print  
Author Topic: Validating a custom date against a calendar  (Read 5197 times)
toonski84
__/--\__
*****
Posts: 2567



« Reply #15 on: August 21, 2003, 04:19:26 PM »

Yeah, but the official definition of it, as it's been used for hundreds of years, is a counting of days from ancient times.  And this is getting off track.  You can use any serial (day count) date to validate a date and do math with it, but the Julian Day Number (in its official form) is the most popular format.
Logged

i]"I know what you're thinking. Did he fire six shots or only five? Well, to tell you the truth, in all this excitement, I've kinda lost track myself. But being as this is a .44 Magnum ... you've got to ask yourself one question: 'Do I feel lucky?' Well, do ya punk?"[/i] - Dirty Harry
na_th_an
*/-\*
*****
Posts: 8244



WWW
« Reply #16 on: August 21, 2003, 06:18:16 PM »

That is what I meant. Sorry for being wrong   :x
Logged

SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
Moneo
Na_th_an
*****
Posts: 1971


« Reply #17 on: August 21, 2003, 09:05:01 PM »

Quote from: "toonski84"
....  but the Julian Day Number (in its official
form) is the most popular format.

That's interesting. Where can I read about this "official form"?
*****
Logged
toonski84
__/--\__
*****
Posts: 2567



« Reply #18 on: August 21, 2003, 09:23:43 PM »

erm... at the link.  the julian day number was made up in the 1500s as a count since the first day of the julian period.  It's been that way for hundreds of years.
Logged

i]"I know what you're thinking. Did he fire six shots or only five? Well, to tell you the truth, in all this excitement, I've kinda lost track myself. But being as this is a .44 Magnum ... you've got to ask yourself one question: 'Do I feel lucky?' Well, do ya punk?"[/i] - Dirty Harry
Moneo
Na_th_an
*****
Posts: 1971


« Reply #19 on: August 21, 2003, 09:42:56 PM »

Ok, Toonski, I looked at the site again. But I can't see what makes their definition of julian days *official*. It doesn't even say who these people are.

This reminds me of all the algorithms for calculating the Easter Sunday. More than half of the algorithms I saw on websites don't work 100%, if at all. I haven't found an "official" one yet. I consider the one I use as good because it was written by Donald Knuth of Stanford University. The above experts on julian days don't even sign their name.
*****
Logged
toonski84
__/--\__
*****
Posts: 2567



« Reply #20 on: August 21, 2003, 09:51:37 PM »

That's because it's a general information site.  There are JD algos all over the internet.  The one on that particular site works as a serial date, but doesnt get the accurate number.  Here are some more links:

http://quasar.as.utexas.edu/BillInfo/JulianDatesG.html - the one I use
http://www.tondering.dk/claus/cal/node1.html - really good
http://www.perldoc.com/perl5.8.0/pod/perlfaq4.html#How-can-I-find-the-Julian-Day-  - official perl documentation
http://www.friesian.com/numbers.htm
http://home.capecod.net/~pbaum/date/jdalg.htm
http://www.koshko.com/calendar/julian-day.shtml
http://developer.irt.org/script/228.htm - irt.org - great javascript site
http://whatis.techtarget.com/definition/0,,sid9_gci212429,00.html
http://www.sizes.com/time/dayJulianr.htm
http://www.wikipedia.org/wiki/Julian_day
http://www.hermetic.ch/cal_stud/jdn.htm
http://www.pietro.org/Astro_Util_StaticDemo/FDetailDateConversions.htm
http://www.sismo.info/tempus/calendarium/daynumber.htm
http://www.wundermoosen.com/CalXHelp/calXJDN.html
http://home.comcast.net/~kelsung/other/calendar/number.htm
http://pacific.commerce.ubc.ca/xr/julian.html
http://www.ortelius.de/kalender/jd_en.php

the julian day is definately more stable than easter calculations, because it's based on a fixed, measuredable point.
Logged

i]"I know what you're thinking. Did he fire six shots or only five? Well, to tell you the truth, in all this excitement, I've kinda lost track myself. But being as this is a .44 Magnum ... you've got to ask yourself one question: 'Do I feel lucky?' Well, do ya punk?"[/i] - Dirty Harry
Moneo
Na_th_an
*****
Posts: 1971


« Reply #21 on: August 21, 2003, 10:39:25 PM »

Wow, Toonski, I'm impressed.
I checked the first 3 on your list, and:
* The 1st and 2nd don't use the same formula, why?
* On the 3rd site, I couldn't actually find the formula.

Now for the big question. Why does anyone need all this questionable sofistication? I have a little formula, which I posted on one of the date challenges, which gives me a date or julian factor starting at the year 0. This has been working for me for about 15 years. I got it from a Texas Instruments calculator manual. I only need it to calculate the number of days beween 2 dates.
*****
Logged
toonski84
__/--\__
*****
Posts: 2567



« Reply #22 on: August 21, 2003, 10:54:40 PM »

Well, right.  My suggestion was to use a serial date.  The most famous and widely used serial date is the count from the julian period, the julian day number.  But really, any serial date can be used, yeah.   Not all of these are algorithms, I just grabbed anything from google that wasnt a calculator.  And *those* are everywhere.
Logged

i]"I know what you're thinking. Did he fire six shots or only five? Well, to tell you the truth, in all this excitement, I've kinda lost track myself. But being as this is a .44 Magnum ... you've got to ask yourself one question: 'Do I feel lucky?' Well, do ya punk?"[/i] - Dirty Harry
Moneo
Na_th_an
*****
Posts: 1971


« Reply #23 on: August 22, 2003, 07:15:26 PM »

Quote from: "toonski84"
Well, right.  My suggestion was to use a serial date.  The most famous and widely used serial date is the count from the julian period, the julian day number.  But really, any serial date can be used, yeah.  ....

You're right, Toonski, but one has to be careful with the terms used, for example, looking through the sites you provided, I found the following terms:
Julian Date
Julian Day
Julian Day Number
Julian Day Period
Julian Day Count
All these seem to be the same, but then there's
Modified Julian Day ...which is something else.

Some of the algorithms talk about an offset of days from
Jan 1, 4712 BC and others from 4713 BC. Some say that the offset is from 0 hours GMT, others from 12 noon. This business of hours can only be interesting to an astromomer.

What really makes me shy away from these algorithms is that they include constants like 4716, 1524.5, 32044, 32782, 146097, etc. What is the definition of these constants, what do they mean and where do they come from?

Another thing that does not give me confidence, is algorithms that are supported by tables. Again, who and how were the values in these tables generated?

In summary, if I were in need of using a serial date (nice term), and I didn't have anything at all, I wouldn't use these complicated, ambiguous, and non-standard algorithms that go back to 4713 BC. I cannot forsee the need of ever requiring a serial date that goes back more than say 200 years. Therefore, I would take a look at something like the Modified Julian Date" and use that if I undersood it and it testied ok, or I would develop my own "Modified" version.
*****
Logged
toonski84
__/--\__
*****
Posts: 2567



« Reply #24 on: August 23, 2003, 12:27:12 AM »

The julian date and the julian day number are the actual count, by default from the beginning of the julian period.  The julian period is the 7800 year period in which everything aligns or something.  The modified julian day number is just the julian day since about 100 years ago so it's only in the 1000s and manageable.  The julian day count is just a wrong term for the julian day number and the julian calendar is the calendar implemented by julius caesar.  Be careful you dont must terms together.
Logged

i]"I know what you're thinking. Did he fire six shots or only five? Well, to tell you the truth, in all this excitement, I've kinda lost track myself. But being as this is a .44 Magnum ... you've got to ask yourself one question: 'Do I feel lucky?' Well, do ya punk?"[/i] - Dirty Harry
Moneo
Na_th_an
*****
Posts: 1971


« Reply #25 on: August 23, 2003, 11:08:43 PM »

Whatever, Toonski. Who needs all that complication and so-called sofistication. Like I said before, most everyone could be more than satisfied with a serial date that went back 200 years, except maybe an astronomer.
*****
Logged
Pages: 1 [2]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!