Formats Methods and Declarations

Except for DoError, all methods in the Format component are public functions. DoError is a private subroutine that is called by the FormatLocaleDateTime, FormatLocaleNumber, FormatLocaleCurrency, and GetLocaleInfo methods. NLS.dll also includes a module named Global.bas. This module contains constant definitions, type definitions, and function declarations for Win32® APIs. The following table lists the methods of the Format component and describes the tasks they perform.

Method Tasks
FormatLocaleDateTime Detects date and time format preferences and converts date and time data to the preferred formats.

Calls GetLocaleInfo and DoError.

Uses Win32 APIs GetTimeFormat, GetDateFormat, and GetLastError.

FormatLocaleNumber Detects numeric format preferences and converts numeric data to the preferred formats.

Calls GetLocaleInfo and DoError.

Uses Win32 APIs GetNumberFormat and GetLastError.

FormatLocaleCurrency Detects currency format preferences and converts currency display style to the preferred formats, but does not convert the value of one type of currency to another.

Calls GetLocaleInfo and DoError.

Uses Win32 APIs GetCurrencyFormat and GetlastError.

GetLocaleInfo Accepts the name of a locale and the hexadecimal value for the locale-dependent piece of information the calling function specifies.

Uses Win32 APIs ntGetLocaleInfo and GetlastError.

DoError Identifies an error and uses the raise method on the err object to report the error.
ConvertDefaultLocale For future implementation.
GetACP For future implementation.
GetSystemDefaultLangID For future implementation.
GetSystemDefaultLCID For future implementation.
GetSystemTime For future implementation.
IsValidCodePage For future implementation.
IsValidLocale For future implementation.