ADSM-L

Re: Dateformat on Solaris 2.5

1997-03-26 07:23:40
Subject: Re: Dateformat on Solaris 2.5
From: Bob Douglas <bob.douglas AT COMPUTING-SERVICES.OXFORD.AC DOT UK>
Date: Wed, 26 Mar 1997 12:23:40 +0000
>In the next release of the product, we plan to follow the following
>rules on our XPG/4 platforms:
>
>1) If Dateformat, Timeformat, or Numberformat options are specified, use them
>2) If they are not specified, use Locale as the default
>3) If Locale specifies the one text date format we can't process
>   (e.g. Monday, September 29, 1997), use our default Dateformat
>4) The year field can be specified as either two digits or four digits
>   in all command-line commands, regardless of the Locale length for Year
>
>Would these rules satisfy both XPG/4 and the concerns of customers like
>Dr. Richter and Monsieur De Witte?  We were considering adding them to the
>fix for IC16007 in the current release as well, and welcome your input.

For output these rules are fine. However, you could do better when
accepting dates and times as input.

   1a) If Dateformat or Timeformat options are specified, accept any
       of the standard ADSM formats irrespective of which option is
       actually set:

       Date:  mm/dd/yyyy  dd-mm-yyyy  yyyy-mm-dd  dd.mm.yyyy  yyyy.dd.mm
       Time:  hh:mm:ss    hh,mm,ss    hh.mm.ss    hh:mm:ssAM/PM

       Provided a four-digit year is given, these formats can easily
       be distinguished by the software. You could even accept a
       one-digit day and month instead of insisting always on two
       digits.

       The advantage is that the caller does not have to remember
       which particular option is set, and indeed may like one
       output format but prefer to input in another.

   1b) If a Numberformat option is specified, use it
   2)  As above
   3)  As above
   4)  A two-digit year is only accepted under rules 2) and 3)

Regards,
Bob Douglas
<Prev in Thread] Current Thread [Next in Thread>