Difference between revisions of "Template:HCalendar event/rule"

From Second Life Wiki
Jump to navigation Jump to search
m (→‎Examples: correcting typo in wiki-syntax)
m (moved User:SignpostMarv Martin/Sandbox/Template:hCalendar event/rule to Template:HCalendar event/rule: Should be ready for "production" use, moving to intended location.)
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly><span class="{{{type|r}}}rule" title="{{#if:{{{freq|}}}|FREQ={{{freq}}};|}}{{#if:{{{interval|}}}|INTERVAL={{{interval}}};|}}{{#if:{{{count|}}}|COUNT={{{count}}};|}}{{#if:{{{until|}}}|UNTIL={{#time:c|{{{until}}}}};|}}{{#if:{{{bymonth|}}}|BYMONTH={{{bymonth}}};|}}{{#if:{{{byday|}}}|BYDAY={{{byday}}};|}}{{#if:{{{byhour|}}}|BYHOUR={{{byhour}}};|}}{{#if:{{{byminute|}}}|BYMINUTE={{{byminute}}};|}}{{#if:{{{bysetpos|}}}|BYSETPOS={{{bysetpos}}};|}}{{#if:{{{WKST|}}}|WKST={{{wkst}}};|}}" style="{{#ifeq:{{{readable|}}}|||display:none;}}">{{{readable|}}}</span></includeonly><noinclude>This template attempts to implement the RRULE and EXRULE elements as described in the [http://microformats.org/wiki/User:TobyInk/hcalendar-1.1 hCalendar 1.1 draft specification].
<includeonly><span class="{{{type|r}}}rule" title="{{#if:{{{freq|}}}|FREQ={{{freq}}};|}}{{#if:{{{interval|}}}|INTERVAL={{{interval}}};|}}{{#if:{{{count|}}}|COUNT={{{count}}};|}}{{#if:{{{until|}}}|UNTIL={{#time:c|{{{until}}}}};|}}{{#if:{{{bymonth|}}}|BYMONTH={{{bymonth}}};|}}{{#if:{{{byday|}}}|BYDAY={{{byday}}};|}}{{#if:{{{byhour|}}}|BYHOUR={{{byhour}}};|}}{{#if:{{{byminute|}}}|BYMINUTE={{{byminute}}};|}}{{#if:{{{bysetpos|}}}|BYSETPOS={{{bysetpos}}};|}}{{#if:{{{WKST|}}}|WKST={{{wkst}}};|}}" style="{{#if:{{{readable|}}}||display:none;}}">{{{readable|}}}</span></includeonly><noinclude>This template attempts to implement the RRULE and EXRULE elements as described in the [http://microformats.org/wiki/User:TobyInk/hcalendar-1.1 hCalendar 1.1 draft specification].


* The template defaults to behave as an RRULE via class="rrule". To alter the behaviour to an EXRULE, specify <nowiki>type=ex</nowiki> when using the template.
* The template defaults to behave as an RRULE via class="rrule". To alter the behaviour to an EXRULE, specify <nowiki>type=ex</nowiki> when using the template.
Line 6: Line 6:
:''It will be necessary to view the source code of this article to see the output.''
:''It will be necessary to view the source code of this article to see the output.''


* Weekly event: <nowiki>{{:User:SignpostMarv Martin/Sandbox/Template:hCalendar event/rule
* Weekly event: <nowiki>{{hCalendar event/rule
|freq=WEEKLY
|freq=WEEKLY
|interval=1
|interval=1
|byday=TU
|byday=TU
}}</nowiki>{{:User:SignpostMarv Martin/Sandbox/Template:hCalendar event/rule
}}</nowiki>{{hCalendar event/rule
|freq=WEEKLY
|freq=WEEKLY
|interval=1
|interval=1
Line 16: Line 16:
}}
}}


* Weekly event with human-readable text: <nowiki>{{:User:SignpostMarv Martin/Sandbox/Template:hCalendar event/rule
* Weekly event with human-readable text: <nowiki>{{hCalendar event/rule
|freq=WEEKLY
|freq=WEEKLY
|interval=1
|interval=1
|byday=TU
|byday=TU
|readable=every Tuesday
|readable=every Tuesday
}}</nowiki>{{:User:SignpostMarv Martin/Sandbox/Template:hCalendar event/rule
}}</nowiki>{{hCalendar event/rule
|freq=WEEKLY
|freq=WEEKLY
|interval=1
|interval=1
Line 27: Line 27:
|readable=every Tuesday
|readable=every Tuesday
}}
}}
[[Category:hCalendar Templates|rule]]
</noinclude>
</noinclude>

Latest revision as of 08:07, 7 July 2010

This template attempts to implement the RRULE and EXRULE elements as described in the hCalendar 1.1 draft specification.

  • The template defaults to behave as an RRULE via class="rrule". To alter the behaviour to an EXRULE, specify type=ex when using the template.

Examples

It will be necessary to view the source code of this article to see the output.
  • Weekly event: {{hCalendar event/rule |freq=WEEKLY |interval=1 |byday=TU }}
  • Weekly event with human-readable text: {{hCalendar event/rule |freq=WEEKLY |interval=1 |byday=TU |readable=every Tuesday }}every Tuesday