Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:Birth date: Difference between revisions

Template page
Blossom (talk | contribs)
Created page with "<noinclude> {{Documentation}} </noinclude> <includeonly> {{#if:{{{1|}}}| {{#time:j F Y|{{{1}}}}} | ''No date provided'' }} </includeonly>"
Fix Birth date to use supplied year/month/day rather than interpreting year alone with current month/day
 
Line 1: Line 1:
<noinclude>
<includeonly>{{#if:{{{1|}}}|{{#if:{{{2|}}}|{{#if:{{{3|}}}|{{#iferror:{{#time:{{#ifeq:{{{df|yes}}}|no|F j, Y|j F Y}}|{{{1}}}-{{padleft:{{{2}}}|2|0}}-{{padleft:{{{3}}}|2|0}}}}|{{{1}}}-{{{2}}}-{{{3}}}}}|{{#iferror:{{#time:F Y|{{{1}}}-{{padleft:{{{2}}}|2|0}}-01}}|{{{1}}}-{{{2}}}}}}}|{{{1}}}}}}}</includeonly><noinclude>
{{Documentation}}
Formats an editor-supplied birth date. Use year, month and day as separate parameters; a single supplied value is preserved without filling in the current month or day.
* Full date: {{Birth date|1861|5|7|df=yes}}
* Month and year: {{Birth date|1861|5}}
* Year only: {{Birth date|1861}}
* Single text value: {{Birth date|7 May 1861}}
* Month first: {{Birth date|1861|5|7|df=no}}
</noinclude>
</noinclude>
<includeonly>
{{#if:{{{1|}}}|
    {{#time:j F Y|{{{1}}}}}
| ''No date provided''
}}
</includeonly>

Latest revision as of 16:47, 31 October 2026

Formats an editor-supplied birth date. Use year, month and day as separate parameters; a single supplied value is preserved without filling in the current month or day.

  • Full date: 7 May 1861
  • Month and year: May 1861
  • Year only: 1861
  • Single text value: 7 May 1861
  • Month first: May 7, 1861