Topic on Help talk:Extension:ParserFunctions

Summary by Tacsipacsi

Substitution works if—and only if—there are no unsubstituted variables in the input.

Terasail (talkcontribs)

Is it possible to substitute #time? Because it does not work when "subst:" is used. Thanks

Andrybak (talkcontribs)

For example: {{subst:#time:Y-m-d|now}} produces: 2020-12-08.

Terasail (talkcontribs)

Ah thanks, I was't using "now" and that was not allowing it to be subst.

Tacsipacsi (talkcontribs)

It should work without now as well: {{subst:#time:Y-m-d}} produces 2020-12-11.

Terasail (talkcontribs)

Yeah I was using {{CURRENTMONTHNAME}} instead of "now" and it just gives an error message when you use subst:

Tacsipacsi (talkcontribs)

It doesn’t make sense to subst: a parser function while keeping its input varying—what wikicode would you expect to get? If you subst: the input as well ({{subst:#time:Y-m-d|{{subst:CURRENTMONTHNAME}}}}), it works: 2020-12-11.

Terasail (talkcontribs)

Yeah well I just wasn't thinking much about what I was doing when I first asked the question... I should have been a bit less lazy and thought more about what I was trying to do but it is what it is.