Are you enjoying the extensions? Did you like the support? Help others decide.

Leave a review
Information
Print

Date

Information
Article Details

Shows a specific date in a specified format or as a wordy representation.

Requirements

None.
The configuration options Show Create Date, Show Modify Date and Show Publish Date are NOT taken into account.

Example

Date example

Language overrides

Wordy representations of the date can be overridden. Here is the exhaustive list of the available keys:

  • PLG_CONTENT_ARTICLEDETAILS_TODAY (value: Today)
  • PLG_CONTENT_ARTICLEDETAILS_YESTERDAY (value: Yesterday)
  • PLG_CONTENT_ARTICLEDETAILS_MINUTEAGO (value: 1 minute ago)
  • PLG_CONTENT_ARTICLEDETAILS_MINUTESAGO (value: %s minutes ago)
  • PLG_CONTENT_ARTICLEDETAILS_HOURAGO (value: 1 hour ago)
  • PLG_CONTENT_ARTICLEDETAILS_HOURSAGO (value: %s hours ago)
  • PLG_CONTENT_ARTICLEDETAILS_DAYAGO (value: 1 day ago)
  • PLG_CONTENT_ARTICLEDETAILS_DAYSAGO (value: %s days ago)
  • PLG_CONTENT_ARTICLEDETAILS_DAYSHOURSMINUTESAGO (value: %s day(s) %s hour(s) %s minute(s) ago)
  • PLG_CONTENT_ARTICLEDETAILS_HOURSMINUTESAGO (value: %s hour(s) %s minute(s) ago)
  • PLG_CONTENT_ARTICLEDETAILS_TOMORROW (value: Tomorrow)
  • PLG_CONTENT_ARTICLEDETAILS_INDAYSONLY (value: In %s days)
  • PLG_CONTENT_ARTICLEDETAILS_INADAY (value: In 1 day)
  • PLG_CONTENT_ARTICLEDETAILS_INANHOUR (value: In 1 hour)
  • PLG_CONTENT_ARTICLEDETAILS_INHOURS (value: In %s hours)
  • PLG_CONTENT_ARTICLEDETAILS_INAMINUTE (value: In 1 minute)
  • PLG_CONTENT_ARTICLEDETAILS_INMINUTES (value: In %s minutes)
  • PLG_CONTENT_ARTICLEDETAILS_INDAYSHOURSMINUTES (value: In %s day(s) %s hour(s) %s minute(s))
  • PLG_CONTENT_ARTICLEDETAILS_INHOURSMINUTES (value: In %s hour(s) %s minute(s))

Internationalization

To add text before the date in a multilingual environment, override the constant keys:

  • PLG_CONTENT_ARTICLEDETAILS_PREPEND_CREATED (when using the created date)
  • PLG_CONTENT_ARTICLEDETAILS_PREPEND_MODIFIED (when using the modified date)
  • PLG_CONTENT_ARTICLEDETAILS_PREPEND_PUBLISHED (when using the published date)
  • PLG_CONTENT_ARTICLEDETAILS_PREPEND_FINISHED (when using the finished date)

The format can also be different for each language. Override the constant key PLG_CONTENT_ARTICLEDETAILS_FORMAT_DATE and add a specific format as value.

For instance, set the key's value d F, following the syntax documented at http://php.net/manual/en/function.date.php (this page can be seen in different languages. Change the en value in the url with your language code).