Difference between revisions of "Template:When"
(duration) |
m |
||
Line 1: | Line 1: | ||
<noinclude> | <noinclude> | ||
− | This template will be used to add time information to an article. It will probably be implemented as a parser function rather than a template so that we can convert any arbitrary date format easily, for example <tt>{</tt><tt>{#when:d=*|h=6|m=30}}</tt> or <tt>{</tt><tt>{#when|27 Jan}}</tt>. This template should allow friendly input with useful defaults for unspecified parameters, the whole thing expanding to a collection of category statements which DPL can query, such as ''Monday'', '':30'', ''06:00'', ''2007'' etc. For | + | This template will be used to add time information to an article. It will probably be implemented as a parser function rather than a template so that we can convert any arbitrary date format easily, for example <tt>{</tt><tt>{#when:d=*|h=6|m=30}}</tt> or <tt>{</tt><tt>{#when|27 Jan}}</tt>. This template should allow friendly input with useful defaults for unspecified parameters, the whole thing expanding to a collection of category statements which DPL can query, such as ''Monday'', '':30'', ''06:00'', ''2007'' etc. DPL can query categories more efficiently and offer more flexible ways of selection such as regular expressions. For complex time information, any number of time statements could be added to a page. |
Also the ability to specify a duration with each time statement should be included too, maybe ''t'' for time. The default value would be zero which is a point in time with no duration. | Also the ability to specify a duration with each time statement should be included too, maybe ''t'' for time. The default value would be zero which is a point in time with no duration. |
Revision as of 12:03, 20 April 2007
This template will be used to add time information to an article. It will probably be implemented as a parser function rather than a template so that we can convert any arbitrary date format easily, for example {{#when:d=*|h=6|m=30}} or {{#when|27 Jan}}. This template should allow friendly input with useful defaults for unspecified parameters, the whole thing expanding to a collection of category statements which DPL can query, such as Monday, :30, 06:00, 2007 etc. DPL can query categories more efficiently and offer more flexible ways of selection such as regular expressions. For complex time information, any number of time statements could be added to a page.
Also the ability to specify a duration with each time statement should be included too, maybe t for time. The default value would be zero which is a point in time with no duration.