Module:Version/doc
Appearance
This is a documentation subpage for Module:Version. It contains usage information, categories and other content that is not part of the original Module page. |
This module is rated as ready for general use. It has reached a mature form and is thought to be bug-free and ready for use wherever appropriate. It is ready to mention on help pages and other resources as an option for new users to learn. To reduce server load and bad output, it should be improved by sandbox testing rather than repeated trial-and-error editing. |
This module is subject to page protection. It is a highly visible module in use by a very large number of pages. Because vandalism or mistakes would affect many pages, and even trivial editing might cause substantial load on the servers, it is protected from editing. |
The main entrypoint is the get
function.
First parameter is the release type, which can be one of the following:
stable
legacy
lts
beta
alpha
Second parameter is the format, which can be one of the following:
version
branch
git
date
Note that alpha
and beta
only work with branch
, the behavior of other output formats is undefined.
Examples
{{#invoke:Version|get|alpha|branch}}
: 1.44{{#invoke:Version|get|beta|branch}}
: 1.43{{#invoke:Version|get|stable|version}}
: 1.42.3{{#invoke:Version|get|stable|branch}}
: 1.42{{#invoke:Version|get|stable|git}}
: REL1_42{{#invoke:Version|get|stable|date}}
: 2024-10-01{{#invoke:Version|get|lts|version}}
: 1.39.10{{#invoke:Version|get|legacy|version}}
: 1.41.4{{#invoke:Version|get|legacylts|version}}
: 1.39.10
That said, you probably want to use one of the wrapper templates in Category:MediaWiki version information templates instead of calling this module directly.[why?]