time_format
Format a datetime.time object using a localizable format.
If use_l10n is provided and is not None, it forces the value to be localized (or not), otherwise it's always localized.
def time_format(
value: datetime.time,
format: string = None,
use_l10n: boolean = None
) - > string
Format a datetime.time object using a localizable format. If use_l10n is provided and is not None, it forces the value to be localized (or not), otherwise it's always localized.
Parameters
| Name | Type | Description |
|---|---|---|
| value | datetime.time | The time object to be formatted |
| format | string = None | The specific format string or named format (e.g., 'TIME_FORMAT') to apply; defaults to the system's TIME_FORMAT if not provided |
| use_l10n | boolean = None | A flag to force or disable localization of the time format; if None, localization is enabled by default |
Returns
| Type | Description |
|---|---|
string | The formatted time string based on the specified or localized format pattern |