× 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: APIs
  • From: Bob Cozzi <BobCozzi@xxxxxxx>
  • Date: Thu, 31 Jul 1997 16:02:01 -0500

To call CEEDYWK

You need to pass it the number of days since 10-14-1582
Here's the code I use to Get the Day of the Week.

     P DayOfWeek       B                   EXPORT
     ** Procedure interface for the get DayOfWeek function 
     D DayOfWeek       PI            10I 0
     D  InputDate                      D   CONST DATFMT(*ISO)
     ** Base date is based on the day the calendar changed 
     D BaseDate        S               D   Static INZ(D'1582-10-14') 
     D nDayOfWeek      S             10I 0  
     D nDays           S             10I 0 
     C     *ISO          TEST(D)   InputDate                            73
     C                   If        *IN73
     C                   Return    -1
     C                   Endif
     C     InDate        SubDur    BaseDate      nDays:*Days 
     C                   CALLB     'CEEDYWK'                              LR
     C                   Parm                    nDays
     C                   Parm                    nDayofWeek 
     C                   return    nDayOfWeek 
     P DayOfWeek       E


Since RPG IV does the date arithmetic for you, I don't use the other API

Bob Cozzi


On Thursday, July 31, 1997 1:19 PM, mancini [SMTP:mancini@ais.net] wrote:
> Does anyone have any sample code on the two following APIs.
> 
> CEEDYWK  -  calculate Day of Week from Lilian Date.
> 
> CEEDAYS   -  convert Date to Lilian Format.
> 
> 
> I need to find the day of the week for a certain date.
> 
> Thank You
> Joe
> 


Bob Cozzi
Bob@rpgdev.net
http://www.rpgdev.net


* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* This is the Midrange System Mailing List!  To submit a new message,   *
* send your mail to "MIDRANGE-L@midrange.com".  To unsubscribe from     *
* this list send email to MAJORDOMO@midrange.com and specify            *
* 'unsubscribe MIDRANGE-L' in the body of your message.  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.