Page MenuHomePhabricator

Create colon parserfunction version of {{CREATIONTIMESTAMP}} etc.
Closed, DuplicatePublic

Description

There are parser functions {{REVISION*}} already which gives some values of the latest revision of the current page. It would be great to have similar set of functions like
{{CREATION*}} i.e. {{CREATIONID}}, {{CREATIONDAY}}, {{CREATIONDAY2}}, {{CREATIONMONTH}}, {{CREATIONMONTH1}}, {{CREATIONYEAR}}, {{CREATIONTIMESTAMP}}, {{CREATIONUSER}}, {{CREATIONSIZE}} which gives the values of the first undeleted revision of the current page.

Event Timeline

Or at least a Lua access in the Title object. Then everything else may be derived by programmers, and no further parser functions wil be required. Lua people would like to get access to both current and creation revision information anyway. If Lua knows, templates may be supported by utility.

Slot issues should be considered as well. That is rather complex for parser functions which are the approach of a decade ago. Lua should get access to a table of slots with revID, user, timestamp, size for the most recent and the first undeleted revision. From that the calendar details like month2 and day may be derived and any local formatting can be done as required.

Getting the first revision of a page is expensive from the current database schema, see also T44135 for the same underlying issue

Maybe a duplicate T33439

Yes, indeed, somewhat duplicate but might change course towards Lua which has not been known 2011 in T33439.

Expensive is okay.

Parser function namespace should not be drown by all these function names. Lua access would be sufficient and is better organized in structured object.

Lua access should be provided anyway, and templates might be served from module.

Especially so many things like DAY and DAY2 and LOCALDAY and CREATIONMONTH1 and numeric and by name is too much to be maintained by different parser functions nowadays. Lua may retrieve a revision object and format date and month and time local or UTC and whatever needed.