Content last modified Tuesday 24 August 2021
hop to #bottom
Current version:
About It:
Get it:
Rate it:
  • Helpful?
  • 1 Yes
  • 0 No
Flag it:

If you'd like to provide updated information and do not have access to directly edit, please contact the site admin; thanks!


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.)

  • lang=""
    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.

  • simpleplurals=""
    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).

  • delimiter=""
    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.

Article Request Count:

Archived [?]: other

Initially released:
Posted here:
28 Nov 2004

You know you want to visit the Archives.
Published with Textpattern