Make dates easier to read for humans, by using relative indications like "two hours ago", "yesterday, 12:30", "today, 17:52", "two weeks ago", "last year", etc. All date indications can be customized through the language files.

This is a full rewrite of the Readable Dates module that was written for Phorum 5.1. Thanks to the new features in 5.2, I could get rid of some nasty constructions that were needed the 5.1 module.

Integration with other modules

Other modules or scripts that want to make use of the readable date formatting, can make use of a special hook call that is implemented by this module. If currently code like this is used for formatting:

Changelog:
----------
2011-01-09 v1.1.11
- Added new German language files. Thanks to Oliver Riesen!
2010-04-26 v1.1.10
- The original dates are now available as $data['orig_<datefield>'], so
they can still be accessed when needed from the templates.
2009-08-26 v1.1.9
- Added support for the Russian language. Also added a Russian language
file. Thanks to phorum.org user sailord for the translation!
- Added a Spanish translation. Thanks to Chris Brown!
- Added a French translation. Thanks to phorum.org user manuvb!
2008-12-14 v1.1.8
- Fixed a typo that caused "date_last_active" for the user profile
screen to never be formatted by this module.
2008-07-25 v1.1.7
- Added a switch in the module config to enable/disable the formatting
of the user registration date on the read pages (Registered: ... ago).
If this switch is enabled, then dates after the configured time
limit will be formatted using a standard short date. This is different
from Phorum's default behavior, because by default Phorum would
use a readable date-like formatting for this date already.
2008-05-28 v1.1.6
- Another undefined index warning fixed and again it was CBiLL
who was kind enough to be the lab rat.
2008-03-26 v1.1.5
- Some more undefined index warnings fixed. These would occur if user
activity tracking is disabled or if the user hides its activity
through the privacy settings. Thanks to CBiLL for the report!
- A configuration option was added to make it possible to disable
the readable numbers (one, two, three instead of 1, 2, 3).
2008-03-11 v1.1.4
- Fixes for some undefined index warnings in readable_dates.php.
Thanks to CBiLL for the heads up!
2008-03-03 v1.1.3
- Added support for formatting dates in the private message and buddy
interfaces (pm list, pm read, buddy list). These features need Phorum
version 5.2.7 or higher (the admin interface will warn about this if
an older version of Phorum is used).
2008-03-02 v1.1.2
- Added an option to specify the maximum time for which a date
should be formatted by this module. Dates that are older will be
displayed using their original formatting. Thanks to CBiLL for
the feature suggestion.
- Fixed a bug, which resulted in empty dates being formatted as
if the date was Januari 1st, 1970 (Epoch zero). Thanks to
CBiLL for the bug report.
2008-03-01 v1.1.1
- Added a better German translation to the package. Thanks to Thomas
for fixing my crappy German translation!
- Fixed the formatting code to make sure that it will work
correctly in localized environments.
2008-03-01 v1.1.0
- Rewrote the module to be compatible with 5.2 and to make full
use of new Phorum features.
2006-05-08 v1.0.7 and bofore
- Stripped these change logs, as then don't have a relation to the new code anymore.

I did an attempt to translate it myself. Thomas is looking at the language file and fixing it for me as we speak^H^H^H^H^Htype. I'll release an updated package in a minute (1.1.1). That one also contains a few small fixes for the code, so get that one after my upload.

But is it possible to make any post more than 12 hours old to have a normal date instead? It look kinda odd seeing 18 hours ago or 14 hours ago etc. I rather have the readable date only effect on anything that is less than 12 hours old and back to normal date if it more than 12 hour old.

It would be nice to have a setting like all / 12 / 24 / 48 etc all for all date and 12 for only on date up to 12 hours etc.

I uploaded version 1.1.3. This version adds support for formatting dates in the private message and buddy interfaces (pm list, pm read, buddy list). These features need Phorum version 5.2.7 (not yet release at time of writing, but this one will probably be release in the next few days) or higher.

If you need the new formatting options now, then you will have to manually modify the pm.php script to add some new hooks that are required for this. If you want to do this, then please refer to changeset 3158 for the required changes.

I uploaded version 1.1.4, which fixes a few undefined index warnings in readable_dates.php. These warnings occurred when viewing the forum message list in threaded view and when requesting the RSS feed.

I found the problem. In your case, this warning was shown for users that hide their activity in the privacy settings. The 1.1.5 version of the module fixes this problem. I also added an option to the configuration screen to be able to disable readable number formatting (i.e. replacing 1, 2, 3 with one, two, three).