සැකිල්ල:Title monthname/doc
This is a documentation subpage for සැකිල්ල:Title monthname. It may contain usage information, categories and other content that is not part of the original සැකිල්ල page. |
මෙම සැකිල්ල පිටු බොහෝ ගණනක භාවිතා වන නිසා සිදුකරන වෙනස් කිරීම් බොහෝ ස්ථානවලට බලපානු ඇත. ඔබ සිදුකිරීමට අදහස් කරන වෙනස්කම් මෙම සැකිල්ලට අදාළ /sandbox හෝ /testcases උපපිටුවල, හෝ ඔබගේ පරිශීලක උපපිටුවේ පළමුව සිදුකොට පරීක්ෂාකර බලන්න. එම වෙනස්කම් සිදුකිරීමට ප්රථම අදාළ සාකච්ඡා පිටුවේ ඒ පිළිබඳව සංවාදයක් ගොඩනැගීමට කාරුණික වන්න.
Transclusion count updated automatically (ප්රලේඛනය වෙතට යොමුවන්න). |
මෙම සැකිල්ල ලුවා භාවිතා කරයි: |
Extracts from a page title the name of a month (January, February, March etc). Returns nothing if there is no match.
Note that the monthname in the title must be properly capitalised. "October" will be matched, but "october" or "OCTOBER" will be ignored.
Some options allow its behaviour to be configured.
Usage
සංස්කරණයBasic usage
සංස්කරණය{{Title monthname}}
This usage will return the first word in the title which matches the correctly-capitalised name of a month.
If no match is found, it returns an empty string. This allows its simple use in templates, e.g.
{{#if: {{Title monthname}}|<!-- do nothing if there is a match -->|This page's title does not include a month}}
Optional parameters
සංස්කරණයThree optional parameters are available:
|page=value
- This forces the template to use a title other than the current page
|nomatch=value
- This parameter is used to specify a message to be generate if no match is found. For example
- Default output
{{Title monthname|page=All Watched Over by Machines of Loving Grace}}
→ - with nomatch
{{Title monthname|page=All Watched Over by Machines of Loving Grace|nomatch=No month!}}
→ No month!
- Default output
- This parameter is used to specify a message to be generate if no match is found. For example
|match=number
- If multiple month names are found, this specifies which match to return, where the first match is match= 1. If a negative number is specified then a match is returned counting from the last match. Hence match = -1 is the same as requesting the last match. Defaults to 1.
- Examples:
{{Title monthname|page=Events in June, July, or August|match=3}}
→ August{{Title monthname|page=Riots in February, March, April, May, June, or July (and maybe November)|match=-2}}
→ July
TemplateData
සංස්කරණයTemplateData for Title monthname
Extracts a 3- or 4-digit year from the current page title. All parameters are optional.
Parameter | Description | Type | Status | |
---|---|---|---|---|
Match Instance | match | If multiple monthnames are found, this specifies which match to return, where the first match is match= 1. If a negative number is specified then a match is returned counting from the last match. Hence match = -1 is the same as requesting the last match. Defaults to 1.
| Number | optional |
No match text | nomatch | If no monthname is found, output the "nomatch" value. Defaults to blank. | String | optional |
Override page title | page | Specified a page title to use other than the current page. If left blank, the template will use the title of the current page
| Page name | optional |
See also
සංස්කරණය- Template:Title year
- Template:Title year+1
- Template:Title year-1
- Template:Title year range
- Template:Title year2range
- Template:Title year2range+1
- Template:Title year2range-1
- Template:Title monthname
- Template:Title decade
- Template:Title century
- Template:Title number
- Template:Make YYYY–YY
- Template:Century name from title year
- Template:Century name from title decade
- Template:Century name from decade or year