1753934 Members
9829 Online
108810 Solutions
New Discussion

Re: DCL question

 
SOLVED
Go to solution
Hoff
Honored Contributor

Re: DCL question

For the stated zero-fill padding, the following is vastly less work:

x = f$fao("!2ZW", month)

Timekeeping and time values are an area that almost certainly will encounter problems when manually parsing and manipulating values; time and timekeeping does look simple, but it's replete with corner cases. Whether involving month or year boundary cases, or with leap year, with the two switches related to daylight saving time, calculations with UTC or such, or with centuries. These are only some of the errors I've encountered, too.

Use the system routines to manage time and time values whenever you can. Don't roll your own where you can avoid it.
Jan van den Ende
Honored Contributor

Re: DCL question

From, sometimes bitter, experience, I can only strongly support Hoff's statement.

The sites I have encountered which had their own "smart" time routines; and when they ran into some "issue" I was called in to find the cause -- and explain !!!
Bottom line:
a number of REALLY smart guys/galls have spent serious effort to get it right - USE SYSTEM supplied date-time functions!

Proost.

Have one on me.

jpe
Don't rust yours pelled jacker to fine doll missed aches.