Browse Prior Art Database

Language Independent Interface for Formatting Time and Date Information including Weekend Specification

IP.com Disclosure Number: IPCOM000014994D
Original Publication Date: 2001-Jun-17
Included in the Prior Art Database: 2003-Jun-20
Document File: 3 page(s) / 126K

Publishing Venue

IBM

Abstract

Disclosed is a programming language independent service that correctly formats date and time information when such information includes weekend and workday specifications. This service has been defined to exploit the additional localization information for the first work day of the week, the first day of the weekend, the second day of the weekend and a discriminator for a half day as the first day of a weekend. The service relies on the locale to provide localization at run time to cater to local preferences. The service is designed as a procedure call to allow its use by a wide number of programming languages across a variety of processing platforms.

This text was extracted from a PDF file.
This is the abbreviated version, containing approximately 39% of the total text.

Page 1 of 3

  Language Independent Interface for Formatting Time and Date Information including Weekend Specification

     Disclosed is a programming language independent service that correctly formats date and time information when such information includes weekend and workday specifications. This service has been defined to exploit the additional localization information for the first work day of the week, the first day of the weekend, the second day of the weekend and a discriminator for a half day as the first day of a weekend. The service relies on the locale to provide localization at run time to cater to local preferences. The service is designed as a procedure call to allow its use by a wide number of programming languages across a variety of processing platforms.

The ACEEFTDS service converts the internal time and date specifications of the TD_STRUCT structure into a character string under the direction of the supplied format conversion specifiers The actual values for the format specifiers are dependent on the current locale settings for LC_TIME category. The syntax of ACEEFTDS is:
void ACEEFTDS ([Locale_Handle], Time_And_Date, Maxsize,

                                 Format, String_out, [fc]) CEE_HANDLE *Locale_Handle; TD_STRUCT *Time_And_Date;

INT4 *Maxsize; VSTRING *Format; VSTRING *String_out; FEED_BACK *fc;

where: Locale_Handle (input/optional) Points to the locale to be used by this service. If none is specified, the current active locale is used.

Time_And_Date (input) Pointer to the time structure to be converted. Maxsize (input) Specifies the maximum number of bytes (including the string terminator) that may be placed in the String_out parameter.

Format (input) Contains the conversion specifications.

     The FORMAT parameter is a character string containing two types of objects: plain characters that are simply placed in the output string and conversion specifications that convert information from the Time_And_Date parameter into a readable form in the output string. Each conversion specification is a sequence of this form:

   %[-][width][.precision]type A percent sign (%) introduces a conversion specification. An optional decimal digit string specifies a minimum field width. A converted value that has fewer characters than the field width is padded with spaces to the left. If the decimal string is preceded by a minus sign, padding with spaces occurs to the right of the converted value.

     If no width is given for numeric fields the appropriate default width is used with the field padded on the left with zeros as required. For strings the output field is made exactly wide enough to contain the string.

An optional precision value gives the maximum number of characters to be printed for the conversion specification. The precision value is a decimal digit string preceded by a period. If the value to be output is longer than the precision the output is truncated on the right.

1

Page 2 of 3

     The type of conversion is specified by one or two conversion characters. The characters...