× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.


  • Subject: Re: Can I get the Day of the week?
  • From: rob@xxxxxxxxx
  • Date: Wed, 16 May 2001 12:09:56 -0500


Do people actually have a business case for going back into the 1500's?
The only case I can see is that the point has been made and your better off
picking a date from the 1800's to be safe.  Now I am going to drop out
before we start to digress into Chinese calendars, or other papal
directives.

Rob Berendt

==================
Remember the Cole!


                                                                                
                                       
                    "Peter Dow"                                                 
                                       
                    <pcdow@yahoo.com>        To:     <RPG400-L@midrange.com>    
                                       
                    Sent by:                 cc:                                
                                       
                    owner-rpg400-l@mi        Subject:     Re: Can I get the Day 
of the week?                           
                    drange.com                                                  
                                       
                                                                                
                                       
                                                                                
                                       
                    05/16/01 11:25 AM                                           
                                       
                    Please respond to                                           
                                       
                    RPG400-L                                                    
                                       
                                                                                
                                       
                                                                                
                                       




Hi Simon,

Thanks for the info! When you say 0001-01-01 was a Sunday, does that take
into consideration any of the compensatory changes (e.g. 1582 or 1752) that
you mentioned? I seem to recall Pope Gregory dropping 9 days or so in 1582,
which would I would think would make a difference in the day of the week
before and after the dropped dates.

Regards,
Peter Dow
Dow Software Services, Inc.
909 425-0194 voice
909 425-0196 fax

----- Original Message -----
From: "Simon Coulter" <shc@flybynight.com.au>
To: <RPG400-L@midrange.com>
Sent: Wednesday, May 16, 2001 5:45 AM
Subject: Re: Can I get the Day of the week?


> S
> Hello  Peter,
>
> You wrote:
> >Just for fun, how about using a BIF? I have no idea if it's faster; then
> >again with today's processors, speed is not always a big issue. But it's
> >shorter. And by using 0001-01-01 as the base, I don't have to worry
about
> >negatives. However, it does return Monday as 1 instead of the more
> >traditional Sunday, and I have no idea if it's correcting for dates
prior
to
> >1533 or whenever it was that the calendar was adjusted...
>
> The system uses a Proleptic Gregorian calendar for its date calculations.
That
> means it applies Gregorian rules to dates that are really Julian.  It
doesn't
> compensate for the rules that were in force prior to 4th October 1582
(when
> the Gregorian calendar came in force -- at least in most Catholic
countries) or
> prior to 2nd September 1752 for Britain or its colonies (including the
USA
at
> the time).
>
> The system uses the Scaliger algorithm to calculate dates which in itself
has an
> interesting bug.  Initialise a DATE field in RPG IV to 0300-03-01 and use
debug
> to see what date actually gets stored.
>
> Sunday is the conventional start of the week in Western countries, but
the
ISO
> standard pegs the start of the week as Monday.  And 0001-01-01 was
actually a
> Sunday and 9999-12-31 will be a Friday (assumming there is no
compensation
for
> the leap year drift that will be apparent by 4000).
>
> Watch this space for a set of date routines that does handle historical
dates
> correctly ....
>
> P.S. %REM (and its litter mate %DIV) came in at 440 for those of you
> contemplating using it.
>
> Regards,
> Simon Coulter.
>
> «»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»
> «» FlyByNight Software         AS/400 Technical Specialists       «»
> «» Eclipse the competition - run your business on an IBM AS/400.  «»
> «»                                                                «»
> «» Phone: +61 3 9419 0175   Mobile: +61 0411 091 400        /"\   «»
> «» Fax:   +61 3 9419 0175   mailto: shc@flybynight.com.au   \ /   «»
> «»                                                           X    «»
> «»               ASCII Ribbon campaign against HTML E-Mail  / \   «»
> «»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»
> +---
> | 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
> +---


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.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 thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.