Browse Prior Art Database

Language Independent Interface For Formatting Time And Date Into A Wide-character String

IP.com Disclosure Number: IPCOM000015120D
Original Publication Date: 2001-Aug-01
Included in the Prior Art Database: 2003-Jun-20
Document File: 4 page(s) / 76K

Publishing Venue

IBM

Abstract

Disclosed is a language independent service that formats date and time localization information including weekend and work day specifications into a wide-character string. The service has been designed to exploit 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 the weekend. The service relies on a 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 on a variety of processing platforms. The ACEEFTDW service converts the internal time and date specifications of the TD_STRUCT structure into a wide-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 ACEEFTDW is : void ACEEFTDW [Locale_Handle], Time_And_Date, Maxsize, Format, Wide_String_out, [fc] CEE_HANDLE *Locale_Handle;

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

Page 1 of 4

  Language Independent Interface For Formatting Time And Date Into A Wide-character String

Disclosed is a language independent service that formats date and time localization information including weekend and work day specifications into a wide-character string. The service has been designed to exploit 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 the weekend. The service relies on a 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 on a variety of processing platforms.

The ACEEFTDW service converts the internal time and date specifications of the TD_STRUCT structure into a wide-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 ACEEFTDW is :

void ACEEFTDW ([Locale_Handle], Time_And_Date, Maxsize,

           Format, Wide_String_out, [fc]) CEE_HANDLE *Locale_Handle;

TD_STRUCT *Time_And_Date; INT4 *Maxsize; VSTRING *Format; WCHAR_T *Wide_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 length (including the string terminator) of the string that may be placed in the Wide-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.

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