ProcessWire module formatting timestamps into human readable relative format (XY units ago)
Modules designed to help site accessibility, standards compliance and SEO.
|Category 2||Text Formatters|
Textformatter modules that provide run-time formatting for blocks of text (typically used with Text/Textarea fields).
|Category 3||Other Modules|
Modules that have a unique purpose not covered by existing categories.
Should be safe for use in production environments. *
|Date Added||January 12, 2013|
This module's files should be placed in /site/modules/ToolsTimeFormat/
How to install or uninstall modules
This is a tiny ProcessWire Modules used for formatting times as 'X seconds ago', 'minutes ago'. It goes up to decades.
Important note: this module uses 'soft limit' for units. That means that it will show '8 days ago' for 8 days, but '1 week ago' for 9 days, for instance. This will be configurable in one of the later releases.
- ProcessWire 2.2
- PHP 5.3+
It's very simple. Load module, pass the timestamp to
format function. Bam, done.
$time_format = $modules->get('ToolsTimeFormat'); $posted = $time_format->ago($page->created);
This module has been renamed to TimeFormat, to accomodat future functionality better. Sorry for any inconvenience.
- fix – fixed translation possibilities (include only format string in
No comments yet. Be the first to post!
Your e-mail is kept confidential and not included with your comment. Website is optional.
- Admin Helpers
- Core Modules
- Development Tools
- Field Types
- File Validator
- Input Fields
- Language Modules
- Language Packs
- Markup Generation
- Premium Modules
- Process Modules
- Proof of Concept
- Site Profiles
- Social, Feeds, Services
- Text Formatters
- Other Modules
- Users and Access
*Use modules at your own risk. There are no guarantees or warranties. It is recommended that you backup your site and database before installing new modules.