Moodle APIs  3.8
Moodle 3.8.6 (Build: 20201109)
Public Member Functions | List of all members
core\output\mustache_user_date_helper Class Reference

Mustache helper that will convert a timestamp to a date string. More...

Public Member Functions

 transform ($args, Mustache_LambdaHelper $helper)
 Read a timestamp and format from the string. More...
 

Detailed Description

Mustache helper that will convert a timestamp to a date string.

License
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

Member Function Documentation

◆ transform()

core\output\mustache_user_date_helper::transform (   $args,
Mustache_LambdaHelper  $helper 
)

Read a timestamp and format from the string.

{{#userdate}}1487655635, Y m d{{/userdate}}

There is a list of formats in lang/en/langconfig.php that can be used as the date format.

Both args are required. The timestamp must come first.

Parameters
string$argsThe text to parse for arguments.
Mustache_LambdaHelper$helperUsed to render nested mustache variables.
Return values
string

The documentation for this class was generated from the following file: