MonthDate Snippet

MonthDate

Evolution snippet to format dates with localized month names

EVO Version: Evolution 1.4x, Evolution 2.x, Evolution 3.x

Evolution snippet to format dates with localized month names (e.g. 24 December 2024)

Based on aDate snippet https://github.com/extras-evolution/aDate

  • rewritten for PHP 8 (replaced deprecated strftime with DateTime)
  • added multilanguage support (aDate was only in russian)
  • added 8 languages: de, en, es, fr, it, nl, ru, uk.
  • added Template Variables support

Parameters

  • &lang - language to use (default: en)
  • &date - date to use (can be TV or system date)
  • &date2 - backup date (can be TV or system date)
  • &short - insert short month name
  • &outFormat - date output template, a string to replace %d%, %m%, %y%

Usage

[[MonthDate? &outFormat=`%d% %m% %y%` &lang=`it` &date=`[*createdon*]` &date2=`[*pub_date*]`]]

System date

[[MonthDate? &date=`[*createdon*]`]]

Template Variable

[[MonthDate? &date=`[*tv_data*]`]]

Formatted date

[[MonthDate? &date=`2024-12-24`]]


Other Snippets for Evolution CMS

go to top