$parser->setFunctionHook( 'subjectpagename', array( __CLASS__, 'subjectpagename' ), SFH_NO_HASH );
$parser->setFunctionHook( 'subjectpagenamee', array( __CLASS__, 'subjectpagenamee' ), SFH_NO_HASH );
$parser->setFunctionHook( 'tag', array( __CLASS__, 'tagObj' ), SFH_OBJECT_ARGS );
- $parser->setFunctionHook( 'formatdate', array( __CLASS__, 'formatDate' ), SFH_NO_HASH );
+ $parser->setFunctionHook( 'formatdate', array( __CLASS__, 'formatDate' ) );
if ( $wgAllowDisplayTitle ) {
$parser->setFunctionHook( 'displaytitle', array( __CLASS__, 'displaytitle' ), SFH_NO_HASH );
!!end
!!test
-Formatted unlinked date
+formatdate parser function
!!input
-{{formatdate:2009-03-24}}
+{{#formatdate:2009-03-24}}
!! result
<p><span class="mw-formatted-date" title="2009-03-24">2009-03-24</span>
</p>
!! end
!!test
-Formatted unlinked date with default format
+formatdate parser function, with default format
!!input
-{{formatdate:2009-03-24|mdy}}
+{{#formatdate:2009-03-24|mdy}}
!! result
<p><span class="mw-formatted-date" title="2009-03-24">March 24, 2009</span>
</p>