Joel Bradbury
made this addon


Overview


Friendly

Timestamps can be your friend too

Download EE1.x or 2.x, Version (1.2) or get it from github

This is a simple plugin for relative time periods for Expression Engine 1.x and 2.x.

Basic usage

My prefered tag usage goes like so:

{exp:jb_friendly entry_date="{entry_date}"}
     This entry was posted <abbr title="{full_date}">{friendly} {direction}</abbr>
{/exp:jb_friendly}

That will generate the date in a friendly format (including handling future/past dates) and wrap the full date in the abbreviation, since (or until) now, and the datetime provided.

If you’d like to do the friendly date between a different period just supply the tag like so:

{exp:jb_friendly entry_date="{comment_date}" relative_date="{entry_date}"}
    This comment was posted <abbr title="{full_date}">{friendly}<abbr> after the article
{/exp:jb_friendly}

Parameters

Tags

Support

If you have an issue with this plugin, support is handled either via github : http://github.com/joelbradbury/jb.friendly.ee_addon
or the author’s site : http://joelbradbury.net/code/friendly

Changelog

1.2
Fixed an issue where mis-formatted dates return ridiculous time periods
1.1
Added handling of RFC formatted dates
1.0
First Public Release

Web Statistics