Template:Event timer/doc: Difference between revisions

basic examples. wip
(Basics. WIP)
 
(basic examples. wip)
Line 19: Line 19:


'''Today''' is if you, for some reason, want to compare the start date and end date for some specific date. This parameter is recommended only for advanced use.
'''Today''' is if you, for some reason, want to compare the start date and end date for some specific date. This parameter is recommended only for advanced use.
=== Dates ===
== Examples ==
=== Basic use ===
<pre>{{Event timer | Start = 23 Sept | End = 22 Dec | Message = '''It's autumn in the Northern Hemisphere on Earth accoring to the astronomical definition.''' | End message = '''Autumn has passed.''' | Future message = '''There's still time until autumn.'''}}</pre>
Let's assume today is 10th October, which is between 23rd September and 22 December. Now, the template will render like this:
{{Event timer | Start = 23 Sept | End = 22 Dec | Message = '''It's autumn in the Northern Hemisphere on Earth accoring to the astronomical definition.''' | End message = '''Autumn has passed.''' | Future message = '''There's still time until autumn.''' | Today = 10 Oct}}
If it was 4th July, before those dates, instead, we'd have the following render instead:
{{Event timer | Start = 23 Sept | End = 22 Dec | Message = '''It's autumn in the Northern Hemisphere on Earth accoring to the astronomical definition.''' | End message = '''Autumn has passed.''' | Future message = '''There's still time until autumn.''' | Today = 4 Jul}}
And, if it was 25th December, after those dates, this is what we would get:
{{Event timer | Start = 23 Sept | End = 22 Dec | Message = '''It's autumn in the Northern Hemisphere on Earth accoring to the astronomical definition.''' | End message = '''Autumn has passed.''' | Future message = '''There's still time until autumn.''' | Today = 10 Oct}}
=== Omitting end and future messages ===
We don't have to show anything before or after the selected dates.
<pre>{{Event timer | Start = 23 Sept | End = 22 Dec | Message = '''It's autumn in the Northern Hemisphere on Earth accoring to the astronomical definition.'''}}</pre>
So, on 10th October we will see this:
{{Event timer | Start = 23 Sept | End = 22 Dec | Message = '''It's autumn in the Northern Hemisphere on Earth accoring to the astronomical definition.''' | Today = 10 Oct}}
But if on 4th July and 25th December, we will see nothing.
{{Event timer | Start = 23 Sept | End = 22 Dec | Message = '''It's autumn in the Northern Hemisphere on Earth accoring to the astronomical definition.''' | Today = 25 Dec}}
=== Single-day ===
<pre>{{Event timer | Start = 26 Oct | End = 26 Oct | Message = '''Happy birthday, [[Jovenan]]!''' | End message = '''Jovenan's birthday has passed.''' | Future message = '''It's not yet Jovenan's birthday'''}}</pre>
On 26th October, we will have the following:
{{Event timer | Start = 26 Oct | End = 26 Oct | Message = '''Happy birthday, [[Jovenan]]!''' | End message = '''Jovenan's birthday has passed.''' | Future message = '''It's not yet Jovenan's birthday''' | Today =  26 Oct}}
Otherwise, we will have either of these:
{{Event timer | Start = 26 Oct | End = 26 Oct | Message = '''Happy birthday, [[Jovenan]]!''' | End message = '''Jovenan's birthday has passed.''' | Future message = '''It's not yet Jovenan's birthday''' | Today =  1 Jan}}
{{Event timer | Start = 26 Oct | End = 26 Oct | Message = '''Happy birthday, [[Jovenan]]!''' | End message = '''Jovenan's birthday has passed.''' | Future message = '''It's not yet Jovenan's birthday''' | Today =  31 Dec}}
=== Styling ===
<pre>{{Event timer | Start = 26 Oct | End = 26 Oct | Message = <div style="width: 80%; margin:auto; text-align: center; border: 3px double blue; background-color: lightsteelblue; font-size: 20px">Happy birthday, Jovenan!</div>}}</pre>
On 26th October, we will see this:
{{Event timer | Start = 26 Oct | End = 26 Oct | Message = <div style="width: 80%; margin:auto; text-align: center; border: 3px double blue; background-color: lightsteelblue; font-size: 20px">Happy birthday, Jovenan!</div>  | End message = '''Jovenan's birthday has passed.''' | Future message = '''It's not yet Jovenan's birthday'''| Today = 26 Oct}}
1,770

edits