Moodle Plugins directory: Format timestamp: Versions: 1.0.0 | Moodle.org
Format timestamp
Format timestamp 1.0.0
README
This filter allows you to run a timestamp through the userdate function before it gets displayed.
How do I get set up?
Place the files into filter/formattimestamp and run notifications.
In order to use the filter use span tags within your content as below:
<span class="formattimestamp">1510656103</span>
Where "1510656103" is a valid Unix timestamp.
If you wish to show the date for a different timezone you can supply one as below:
<span class="formattimestamp">1510656103 Pacific/Fiji</span>
Where Pacific/Fiji is any valid time zone for your version of PHP as listed on http://php.net/manual/en/timezones.php
If you wish to show the date in a different format you can supply one as below:
<span class="formattimestamp_format_strftimemonthyear">1510656103</span>
Where strftimemonthyear is any date format from lang/en/langconfig.php e.g.
$xslt
$string['strftimedate'] = '%d %B %Y';
$string['strftimedatefullshort'] = '%d/%m/%y';
$string['strftimedateshort'] = '%d %B';
$string['strftimedatetime'] = '%d %B %Y, %I:%M %p';
$string['strftimedatetimeshort'] = '%d/%m/%y, %H:%M';
$string['strftimedaydate'] = '%A, %d %B %Y';
$string['strftimedaydatetime'] = '%A, %d %B %Y, %I:%M %p';
$string['strftimedayshort'] = '%A, %d %B';
$string['strftimedaytime'] = '%a, %H:%M';
$string['strftimemonthyear'] = '%B %Y';
$string['strftimerecent'] = '%d %b, %H:%M';
$string['strftimerecentfull'] = '%a, %d %b %Y, %I:%M %p';
$string['strftimetime'] = '%I:%M %p';
N.B. If you want to understand what the strings above mean then visit http://php.net/manual/en/function.strftime.php
Note - the filter won't work if any other classes or IDs are set on this element.
Version information
- Version build number
- 2017111300
- Version release name
- 1.0.0
- Maturity
- Versão estável
- MD5 Sum
- 42f3abb828d747b036e04e1551509db7
- Supported software
- Moodle 3.3, Moodle 3.4
- Latest release for Moodle 3.3
- Latest release for Moodle 3.4
Version control information
- Version control system (VCS)
- GIT
- VCS repository URL
Default installation instructions for plugins of the type Filters
- Make sure you have all the required versions.
- Download and unpack the filter plugin.
- Place the folder (eg "myfilter") in the "filter" subdirectory.
- Visit http://yoursite.com/admin to finish the installation