Difference between revisions of "Template:Date"
From Timelines
(restore {{doc}} and {{pp-template}}) |
(remove 'only year' formatting - breaks yyyy-mm-dd) |
||
Line 5: | Line 5: | ||
--> = {{{1|}}}<!-- error or "none", so no formatting --> | --> = {{{1|}}}<!-- error or "none", so no formatting --> | ||
|<!-- continue with formatting --> | |<!-- continue with formatting --> | ||
− | + | {{#ifeq:{{#time:Y|{{{1|1 Jan 2000}}} 1996}}{{#time:Y|{{{1|1 Jan 2000}}} 2004}}|19962004 | |
− | + | |<!-- no year --> | |
− | + | {{#ifeq:{{#time:d|{{{1|}}} 2036}}|{{#time:d|{{{1|}}} }} | |
− | + | |<!-- month+day -->{{#time: | |
− | + | {{#switch: {{lc: {{#ifeq:{{{3|}}}|y|L}}{{{2|}}} }} | |
− | + | | lmdy | liso | lymd = [[:F j]] | |
− | + | | mdy | iso | ymd = F j | |
− | + | | ldmy | l = [[:j F]] | |
− | + | | #default = j F | |
− | + | }}|{{{1|}}} 2000 }}<!-- default='dmy' or null or "" or unsupported option --> | |
− | + | |<!-- month only -->{{#time: | |
− | + | {{#switch: {{lc: {{#ifeq:{{{3|}}}|y|L}}{{{2|}}} }} | |
− | + | | lmdy | liso | lymd | |
− | + | | ldmy | l = [[F]] | |
− | + | | #default = F | |
− | + | }}|{{{1|}}} 2000 }}<!-- default='dmy'/'mdy'/'ymd'/'iso'/null/""/unsupported opt --> | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
}} | }} | ||
− | |<!-- | + | |<!-- with year--> |
− | {{#switch: {{lc: {{#ifeq:{{{3|}}}|y|L}}{{{2|}}} }} | + | {{#if: {{#iferror:{{#time:j|2 {{{1|}}}}}|*D*|{{#iferror:{{#time:j|2000 {{{1|}}}}}|*D*| }}}} |
− | + | |<!-- day+month+year -->{{#time: | |
− | + | {{#switch: {{lc: {{#ifeq:{{{3|}}}|y|L}}{{{2|}}} }} | |
− | + | | lmdy = [[:F j]], [[Y]] | |
+ | | mdy = F j, Y | ||
+ | | liso = [[Y|Y-]][[F j|m-d]]<!-- i.e. [[Y-m-d]] --> | ||
+ | | iso = Y-m-d | ||
+ | | lymd = [[Y]] [[:F j]] | ||
+ | | ymd = Y F j | ||
+ | | ldmy | l = [[:j F]] [[Y]] | ||
+ | | #default = j F Y | ||
+ | }}|{{{1|}}} }}<!-- #default='dmy' or null or "" or unsupported option --> | ||
+ | |<!-- month+year -->{{#time: | ||
+ | {{#switch: {{lc: {{#ifeq:{{{3|}}}|y|L}}{{{2|}}} }} | ||
+ | | lmdy | liso | lymd | ldmy | l = [[:F Y]] | ||
+ | | #default = F Y | ||
+ | }}|{{{1|}}} }}<!-- default='dmy'/'iso'/'mdy'/null/""/unsupported option --> | ||
}} | }} | ||
}} | }} |
Revision as of 10:06, 18 December 2008
18 December 2024 Lua error in Module:Effective_protection_level at line 60: attempt to index field 'TitleBlacklist' (a nil value).
Template documentation[create]
Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages. Please add categories to the /doc subpage. Subpages of this template. |