Home > concrete5 for developers > How to change the date format in Downloads List addon

How to change the date format in Downloads List addon

Here is a quick note for those who want to change the date format output of our Downloads List addon.

You can edit the block template (by default it can be found here: ‘/packages/swp_downloads_list/blocks/swp_downloads_list/view.php’)

Find this line:

echo $fv->getDateAdded("user");

and change in this way:

echo date("d/m/y", strtotime($fv->getDateAdded("user")));

You can change “d/m/y” to any other date/time format you want. It is php date format string, so you may use this doc for reference: http://www.php.net/date

Or you can just ask us for help.

Categories: concrete5 for developers Tags:
  1. No comments yet.
  1. July 26th, 2014 at 11:38 | #1