show_date()

show_date()#

Formats a given timestamp into a human-readable date string based on the specified date mode and timezone offset.

Prototype

const char *show_date(
    timestamp_t time,
    int timezone,
    const struct date_mode *mode
);

Parameters

Key

Type

Description

time

timestamp_t

The timestamp to be formatted.

timezone

int

The timezone offset in minutes from UTC.

mode

const struct date_mode *

Pointer to a date_mode structure specifying the formatting style.


Return Value

A pointer to a statically allocated string containing the formatted date.

Notes

The returned string is stored in a static buffer and should not be modified or freed by the caller.

Prototype

// Not applicable in JS

Prototype

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