MCPcopy
hub / github.com/django/django / time_format

Function time_format

django/utils/formats.py:160–169  ·  view source on GitHub ↗

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.

(value, format=None, use_l10n=None)

Source from the content-addressed store, hash-verified

158
159
160def time_format(value, format=None, use_l10n=None):
161 """
162 Format a datetime.time object using a localizable format.
163
164 If use_l10n is provided and is not None, it forces the value to
165 be localized (or not), otherwise it's always localized.
166 """
167 return dateformat.time_format(
168 value, get_format(format or "TIME_FORMAT", use_l10n=use_l10n)
169 )
170
171
172def number_format(value, decimal_pos=None, use_l10n=None, force_grouping=False):

Callers 3

test_l10n_enabledMethod · 0.90
localizeFunction · 0.70

Calls 1

get_formatFunction · 0.85

Tested by 2

test_l10n_enabledMethod · 0.72