|naturaltime Filter

says how long ago a datetime was.

Date and Time Most Useful As Markdown

Argument
None
Requires
{% load humanize %} and "django.contrib.humanize" in INSTALLED_APPS

Documentation

Turns a datetime into how far it is from now, in the phrasing a person would use.

Template

{% load humanize %}
<p>Last seen {{ user.last_login|naturaltime }}</p>

Result

<p>Last seen 29 seconds ago</p>

Future datetimes are phrased forwards — “an hour from now” — so it reads correctly either side of the present. Unlike timesince, it needs no second argument and handles the “now” case itself.

More Date and Time Filters

All Date and Time Filters


Did we get something wrong? Is there a use case for the naturaltime filter that we should add? Please let us know.

Send Feedback

Official Documentation
This page last updated on August 20, 2026