× 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.



On Fri, Mar 23, 2012 at 6:53 PM, Barbara Morris <bmorris@xxxxxxxxxx> wrote:
On 2012/3/23 11:28 AM, John Yeung wrote:
For the *USA format, %DATE handles single
digits for both month and day.

That's not a documented feature. RPG officially
requires that the month and day each have two
digits, with leading zeros if necessary.

That is what I expected, but I tried it out on the V5R2 machine at
work, and the leading zeros were not needed.

Chuck's message suggests maybe the language implementation was
tightened up to better match the docs in subsequent versions. In my
opinion, this is not a good direction. Working with dates is such a
ridiculously common thing to do, and so, so easy for the compiler to
handle this kind of thing, why force everyone to roll their own?
Sure, folks who know what they're doing will probably just put it in a
service program and always call it from there, but... it just seems
like such a waste. (And you *know* some folks will not implement
their routine correctly. How many incorrect home-brew leap-year
calculators are out there? Way too many to count.)

John

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

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.