|
On Fri, Mar 23, 2012 at 6:53 PM, Barbara Morris<bmorris@xxxxxxxxxx> wrote:
On 2012/3/23 11:28 AM, John Yeung wrote:That is what I expected, but I tried it out on the V5R2 machine at
For the *USA format, %DATE handles singleThat's not a documented feature. RPG officially
digits for both month and day.
requires that the month and day each have two
digits, with leading zeros if necessary.
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 mailing list archive is Copyright 1997-2025 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.