MCPcopy
hub / github.com/django/django / format

Function format

django/utils/dateformat.py:326–329  ·  view source on GitHub ↗

Convenience function

(value, format_string)

Source from the content-addressed store, hash-verified

324
325
326def format(value, format_string):
327 "Convenience function"
328 df = DateFormat(value)
329 return df.format(format_string)
330
331
332def time_format(value, format_string):

Callers 11

dateFunction · 0.90
test_dateMethod · 0.90
test_naive_datetimeMethod · 0.90
test_epochMethod · 0.90
__format__Method · 0.70
test_lazy_formatMethod · 0.50

Calls 2

DateFormatClass · 0.85
formatMethod · 0.45

Tested by 9

test_dateMethod · 0.72
test_naive_datetimeMethod · 0.72
test_epochMethod · 0.72
test_lazy_formatMethod · 0.40