MediaWiki REL1_35
MediaWiki\Hook\GetRelativeTimestampHook Interface Reference

Stable to implement. More...

Inheritance diagram for MediaWiki\Hook\GetRelativeTimestampHook:

Public Member Functions

 onGetRelativeTimestamp (&$output, &$diff, $timestamp, $relativeTo, $user, $lang)
 Use this hook to pre-emptively override the relative timestamp generated by MWTimestamp::getRelativeTimestamp().
 

Detailed Description

Stable to implement.

Definition at line 14 of file GetRelativeTimestampHook.php.

Member Function Documentation

◆ onGetRelativeTimestamp()

MediaWiki\Hook\GetRelativeTimestampHook::onGetRelativeTimestamp ( $output,
$diff,
  $timestamp,
  $relativeTo,
  $user,
  $lang 
)

Use this hook to pre-emptively override the relative timestamp generated by MWTimestamp::getRelativeTimestamp().

Since
1.35
Parameters
string&$outputString for the output timestamp
DateInterval&$diffDifference between the timestamps
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: