MediaWiki REL1_35
MediaWiki\Hook\GetHumanTimestampHook Interface Reference

Stable to implement. More...

Inheritance diagram for MediaWiki\Hook\GetHumanTimestampHook:

Public Member Functions

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

Detailed Description

Stable to implement.

Definition at line 13 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 MWTimestamp::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: