Date and Time Filters
9 filters
- date for formatting dates. Most useful
- localtime converts a datetime to the current time zone. Needs {% load tz %}
- naturalday says today or yesterday instead of a date. Needs {% load humanize %}, and django.contrib.humanize in INSTALLED_APPS
- naturaltime says how long ago a datetime was. Needs {% load humanize %}, and django.contrib.humanize in INSTALLED_APPS Most useful
- time for formatting times. Most useful
-
timesince
outputs the amount of time between the value and
to_date. Most useful -
timeuntil
outputs the amount of time between
from_dateand the value. Most useful - timezone converts a datetime to a given time zone. Needs {% load tz %}
- utc converts a datetime to UTC. Needs {% load tz %}
