formatdate()
#
formatdate()
formats a given timestamp into a human-readable date string based on a specified format.
Prototype
char *formatdate(
time_t t,
char *bf,
int bfsize,
const char *format
);
Parameters
Key |
Type |
Description |
---|---|---|
|
|
The timestamp to be formatted. |
|
|
The buffer where the formatted date string will be stored. |
|
|
The size of the buffer |
|
|
The format string specifying the output format of the date. |
Return Value
Returns a pointer to the formatted date string stored in bf
.
Notes
[‘If format
is NULL or empty, the default format DD/MM/CCYY-W-ZZZ
is used.’, ‘Internally, strftime()
is used to generate the formatted date string.’, ‘Ensure that bf
has enough space to store the formatted string.’]
Prototype
// Not applicable in JS
Prototype
# Not applicable in Python
Examples
// TODO C examples
// TODO JS examples
# TODO Python examples