MediaWiki master
MediaWiki\Hook\GetHumanTimestampHook Interface Reference

This is a hook handler interface, see docs/Hooks.md. More...

Inherited by MediaWiki\HookContainer\HookRunner.

Public Member Functions

 onGetHumanTimestamp (&$output, $timestamp, $relativeTo, $user, $lang)
 Use this hook to preemptively override the human-readable timestamp generated by Language::getHumanTimestamp().
 

Detailed Description

This is a hook handler interface, see docs/Hooks.md.

Use the hook name "GetHumanTimestamp" to register handlers implementing this interface.

Stability: stable
to implement

Definition at line 16 of file GetHumanTimestampHook.php.

Member Function Documentation

◆ onGetHumanTimestamp()

MediaWiki\Hook\GetHumanTimestampHook::onGetHumanTimestamp ( & $output,
$timestamp,
$relativeTo,
$user,
$lang )

Use this hook to preemptively override the human-readable timestamp generated by Language::getHumanTimestamp().

Since
1.35
Parameters
string&$outputOutput timestamp
MWTimestamp$timestampCurrent (user-adjusted) timestamp
MWTimestamp$relativeToRelative (user-adjusted) timestamp
User$userUser whose preferences are being used to make timestamp
Language$langLanguage that will be used to render the timestamp
Returns
bool|void True or no return value to continue, or false to use the custom output

Implemented in MediaWiki\HookContainer\HookRunner.


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