localdtconv() — Date and time formatting convention inquiry
Standards
Standards / Extensions | C or C++ | Dependencies |
---|---|---|
Language Environment | both |
Format
#include <locale.h>
struct dtconv *localdtconv(void);
General description
Determines the date/time format information of the current locale.
To avoid infringing on the user's name space, this nonstandard function has two names. One name is prefixed with two underscore characters, and one name is not. The name without the prefix underscore characters is exposed only when you use LANGLVL(EXTENDED).
To use this function, you must either invoke the function using its external entry point name (that is, the name that begins with two underscore characters), or compile with LANGLVL(EXTENDED). When you use LANGLVL(EXTENDED) any relevant information in the header is also exposed.
Returned value
struct dtconv {
char *abbrev_month_names[12]; /* Abbreviated month names */
char *month_names[12]; /* full month names */
char *abbrev_day_names[7]; /* Abbreviated day names */
char *day_names[7]; /* full day names */
char *date_time_format; /* date and time format */
char *date_format; /* date format */
char *time_format; /* time format */
char *am_string; /* AM string */
char *pm_string; /* PM string */
char *time_format_ampm; /* long date format */
char *iso_std8601_2000; /* ISO 8601:2000 std date format*/
};
The dtconv structure is an IBM® extension that stores values from the LC_TIME category of the current locale. It is initialized by the setlocale() function and copied to the user-supplied dtconv when localdtconv() is called.
The dtconv structure can be overwritten by subsequent calls to localdtconv() and setlocale() with LC_ALL or LC_TIME.
Related information
- Se the topic about internationalization of locales and character sets in z/OS XL C/C++ Programming Guide
- locale.h
- time.h
- asctime(), asctime64() — Convert time to character string
- asctime_r(), asctime64_r() — Convert date and time to a character string
- ctime(), ctime64() — Convert time to character string
- ctime_r(), ctime64_r() — Convert time value to date and time character string
- gmtime(), gmtime64() — Convert time to broken-down UTC time
- gmtime_r(), gmtime64_r() — Convert a time value to broken-down UTC time
- localeconv() — Query numeric conventions
- localtime(), localtime64() — Convert time and correct for local time
- localtime_r(), localtime64_r() — Convert time value to broken-down local time
- mktime(), mktime64() — Convert local time
- setlocale() — Set locale
- strftime() — Convert to formatted time
- time(),time64() — Determine current UTC time
- tzset() — Set the time zone