Internationalization and localization tools


C/C++ Date and Time Functions

struct tm *getdate(const char *string);

Internationalization (I18n) Function Overview

The interface to getdate is the simplest possible for a function to parse a string and return the value. string is the input string and the result is returned in a statically-allocated variable.

The details about how the string is processed are hidden from the user. In fact, they can be outside the control of the program. Which formats are recognized is controlled by the file named by the environment variable DATEMSK. This file should contain lines of valid format strings which could be passed to strptime.

I18n Issues

This function is inadequate for an internationalized application. In order to have any control over the parsing of localized dates and times with this function, an external file and environment variable need to be modified, potentially "on the fly". This is not at all practical.

Use the strptime function instead since it provides more control for localized date and time strings.

Recommended Replacements*

*If you're already using the recommended function, see I18n Issues for other reasons why Globalyzer is detecting the function.

C/C++ Date, Time, and Currency Functions

 

Lingoport internationalization and localization services and software