parse_date_format()

parse_date_format()#

Parses a date format string and initializes a date_mode structure with the corresponding format type and localization settings.

Prototype

void parse_date_format(
    const char *format,
    struct date_mode *mode
);

Parameters

Key

Type

Description

format

const char *

The date format string to be parsed.

mode

struct date_mode *

Pointer to a date_mode structure that will be initialized based on the parsed format.


Return Value

This function does not return a value.

Notes

If the format string starts with auto:, the function selects an appropriate format based on whether the output is a terminal. The function also supports historical aliases such as default-local for local time formatting.

Prototype

// Not applicable in JS

Prototype

# Not applicable in Python
Examples
// TODO C examples
// TODO JS examples
# TODO Python examples