Thread View: comp.lang.rexx
1 messages
1 total messages
Started by A. Harry Williams
Sun, 21 Apr 1996 13:25
Re: Date arithmetic missing in REXX
Author: A. Harry Williams
Date: Sun, 21 Apr 1996 13:25
Date: Sun, 21 Apr 1996 13:25
40 lines
2796 bytes
2796 bytes
On Sun, 21 Apr 1996 07:16:23 GMT said: >In <4ksniq$9fn@ns2.borg.com>, warren@borg.com writes: >>> javier5@ibm.net writes: >>>Did I miss something? I would think that date arithmetic should >>>be something that one would want as part of the standard REXX. >> >>Date processing involves algorithms and definitions of intention, somewhat >like >>litigants in a courtroom. It does not define a language. > >I truly believe that the only people who define a language are those that >create it. Look at Xbase for instance. It has date processing in it. > >My reasoning behind having date arithmetic in REXX is the following. The >domain of the tasks best handled with REXX are very different than what >would be done with languages such as Pascal and C/C++. One task >commonly performed in REXX are simple scheduling of tasks, and as a >means of easily calling other programs. Because of its ease of use it >is also used in simple programs (or even big ones) in which speed of >development is more important than raw performance. In any of the >mentioned cases date arithmetic would be something that would >substantially add to the language. > >As it stands REXX already has a date function that returns different >formats including a julian format. Why it is so terrible to consider >having a function that takes a julian date and returns a string >in date format? You could use the same options as date, excluding > the B option which is Julian, to make it easier on users. You've fairly loosely used two different terms, "date arthimetic" and "date processing". I'm not sure what "date processing" is, but what you've described in the above paragraph is not "date arthimetic" but "date conversion" - converting a given date from one presentation format to another. That is fairly non-controversial, and as Ross stated, agreed to. Arthimetic is a little more tricky. Today is April 21, 1996. It can be represented at 19960421. The +1 day is 19960422. The +7 day is 19960428, and the +14 day is 19960505. Most people would agree that the +1 month would be 19960521. However, it I had 19960131, what is +1 month? 19960229? 19960301? 19960302? How does it compare to 19950131 +1 month? What is 19960421 +1 year? How does it compare to 19950421+1year?
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads