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)
| 158 | |
| 159 | |
| 160 | def 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 | |
| 172 | def number_format(value, decimal_pos=None, use_l10n=None, force_grouping=False): |