It takes a certain date specified in parts (i. e. year, month, hour etc.) and spills out a ‘time since’ information for the event, both past and future.
If some units are not provided, no values for these units are returned either. Some examples:
<txp:fha_time_diff year="2004" month="3" day="23" hour="2" minute="40" />
Returns a complete time information, from years to minutes.
<txp:fha_time_diff year="2000" month="10" />
Returns months and years since October 2000.
<txp:fha_time_diff year="1980" month="5" day="1" />
Returns years, months and days since May 1, 1980.
<txp:fha_time_diff year="1975" />
Only returns years since 1975.
Additionally, these arguments can be passed to the plugin. (You don’t need them for basic use with English language.)
Sets a language (two chars) for unit words; see plugin source for languages provided (sofar Czech and English only) and hints on how to add others. If not set, the plugin tries the site wide language setting, otherwise ‘en’ is assumed.
If set to a non-zero number, it indicates which amount triggers the plural form (e. g. ‘years’ instead of ‘year’). If set to zero, it turns on special word forms handling that always follows the last digit (e. g. necessary for Czech dates). If not set, it defaults to a language-specific value (2 for English, 0 for Czech).
Sets characters that should separate individual values. If not set, a comma with a space are assumed.
The plugin is based upon a script written by Mark H. Kathmann.
Archived [?]: other