|
Fine then be that way...but it will only work that way because of the calendar changes. I am sure no one could ever tell exactly what day of the week it was prior to the 1600's (or whatever that magic number is) because of the many calendars that were involved. If it was Monday for us, it might be Friday for the Chinese. Maybe I should shut up now.... -----Original Message----- From: Bartell, Aaron L. (TC) [mailto:ALBartell@Taylorcorp.com] Sent: Wednesday, May 16, 2001 11:55 AM To: 'RPG400-L@midrange.com' Subject: RE: Can I get the Day of the week? <Snip1> >The one problem I have with most of these suggestions is that the date is then dependant upon a >known date. <Snip2> > It takes any date after 1600 and can turn it into a day of the week. You just agreed to the exact thing you are fighting against. Sorry, just had to point that out. Aaron Bartell -----Original Message----- From: Wills, Mike N. (TC) [mailto:MNWills@Taylorcorp.com] Sent: Wednesday, May 16, 2001 10:27 AM To: 'RPG400-L@midrange.com' Subject: RE: Can I get the Day of the week? I am not saying that anyone is wrong in the way they do it, just that there could be a better way (more code but more reliable). The formula I posted before is Zeller's Congruence. It takes any date after 1600 and can turn it into a day of the week. Most programs I have seen here uses a reference date in the 1990's, what if you need for some reason a report before the date you use as a reference? If that was handled I don't really see a problem then. Mike (the young rebel coder) Wills -----Original Message----- From: Mark A. Manske [mailto:mmanske@minter-weisman.com] Sent: Wednesday, May 16, 2001 9:18 AM To: RPG400-L@midrange.com Subject: RE: Can I get the Day of the week? I myself do not understand the issue with all these great ways to do this, if you do not have a date for a reference, then are you going to generate a random number? In order to know what a date is for a day of the week, there has to be a point of reference, either we code it, or it is in the OS of whatever platform you are on - whether you can see the point of reference or not does not matter, it must exist. If you are concerned with the "restrictions" of the calendar not being very accurate prior to the creation of the Gregorian calendar - I would like to know what manager has you creating a business application (as the AS/400 is mostly geared towards) that even cares about dates prior to the industrial revolution. I would also be very concerned about the management looking for correct date calculations that are beyond the year 4000 when we will see a slight drift in the leap year algorithm - these people need to be more realistic in there requirements - who in their right mind would let someone take out a home mortgage for over 2,000 years.... let us be realistic - these many different ways to come up with a single solution work today and for hundreds of years to come and will calculate properly historical dates that mean something. (Like IBM was in business in 1652 to have the need to calculate an old A/R account from back then).... If anyone knows of a way to figure this out, without having any idea about what a calendar even looks like, more power to you, and please, enlighten the rest of us :) As for me, in the real world, I do not even care about the year 2350 if it is a Monday or a Friday - I'll be dead and forgotten, and God help us all, so will my code :) Just my two bits.. Mark -----Original Message----- From: owner-rpg400-l@midrange.com [mailto:owner-rpg400-l@midrange.com]On Behalf Of Wills, Mike N. (TC) Sent: Wednesday, May 16, 2001 8:30 AM To: 'RPG400-L@midrange.com' Subject: RE: Can I get the Day of the week? The one problem I have with most of these suggestions is that the date is then dependant upon a known date. Doesn't other people see something wrong with this? Mike -----Original Message----- From: boldt@ca.ibm.com [mailto:boldt@ca.ibm.com] Sent: Wednesday, May 16, 2001 7:12 AM To: rpg400-l@midrange.com Subject: Re: Can I get the Day of the week? +--- | This is the RPG/400 Mailing List! | To submit a new message, send your mail to RPG400-L@midrange.com. | To subscribe to this list send email to RPG400-L-SUB@midrange.com. | To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +--- +--- | This is the RPG/400 Mailing List! | To submit a new message, send your mail to RPG400-L@midrange.com. | To subscribe to this list send email to RPG400-L-SUB@midrange.com. | To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +--- +--- | This is the RPG/400 Mailing List! | To submit a new message, send your mail to RPG400-L@midrange.com. | To subscribe to this list send email to RPG400-L-SUB@midrange.com. | To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +--- +--- | This is the RPG/400 Mailing List! | To submit a new message, send your mail to RPG400-L@midrange.com. | To subscribe to this list send email to RPG400-L-SUB@midrange.com. | To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +---
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.