mdxdave / time-ago
Displays the time has been past since a given date
Installs: 8 748
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 2
Forks: 1
Type:craft-plugin
Requires
- craftcms/cms: ^4.0.0|^5.0.0
- nesbot/carbon: ^2.0.0
This package is auto-updated.
Last update: 2025-04-06 00:21:34 UTC
README
Displays time ago for a given timestamp value within a Craft CMS Twig template.
Requirements
This plugin requires Craft CMS 5.0.0 or later.
Installation
To install the plugin, follow these instructions.
-
Open your terminal and go to your Craft project:
cd /path/to/project
-
Then tell Composer to load the plugin:
composer require mdxdave/time-ago
-
In the Control Panel, go to Settings → Plugins and click the “Install” button for TimeAgo.
Using TimeAgo
Just use the following code in your Twig template file:
{{ entry.postDate.getTimestamp()|timeAgo }}
If you want to use another language than english, use:
{{ entry.postDate.getTimestamp()|timeAgo("de") }}
Brought to you by MDXDave