Internationalization and localization tools


C/C++ Date and Time Functions

int getdate_r(const char *string, struct tm *tp);

Internationalization (I18n) Function Overview

The getdate_r function is the reentrant counterpart of getdate. It does not use the global variable getdate_err to signal an error, but instead returns an error code. The same error codes as described in the getdate_err documentation above are used, with 0 meaning success.

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.

Note the strptime function also is reentrant.

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