User:Thayts/Userboxes/DST in user time zone
From Wikipedia, the free encyclopedia
It is approximately 11:47 where this user lives. |
With this userbox you let everyone know what time it is at your place, simply by providing your time zone.
It makes use of the {{Current hour in time zone}} and {{Current minute in time zone}} templates, which automatically adjust the time according to daylight saving time (DST). Please refer to the documentation of those templates to see which time zones are supported. Instead of giving a time zone, an offset can also be given (see below).
Clicking the refresh icon will refresh the time by purging your user page.
Usage
- See below for examples.
'''{{User:Thayts/Userboxes/DST in user time zone''' <span style="display:block;">'''|'''replace with '''''time zone abbreviation''''' or '''''hour offset''''' </span><span style="display:block;">|replace with ''minute offset'' (only works if ''hour offset'' is used) </span><span style="display:block;">|12h<span style="margin-left:48px;">=</span><span style="margin-left:8px;">''no''</span> </span><span style="display:block;">|24h<span style="margin-left:48px;">=</span><span style="margin-left:8px;">''yes''</span> </span><span style="display:block;">|dst<span style="margin-left:48px;">=</span><span style="margin-left:8px;">''yes''</span> </span><span style="display:block;">|place<span style="margin-left:32px;">=</span> </span><span style="display:block;">|text<span style="margin-left:40px;">=</span><span style="margin-left:8px;">''where this user lives''</span> </span><span style="display:block;">|bg-c<span style="margin-left:40px;">=</span><span style="margin-left:8px;">''#e2f2ff''</span> </span><span style="display:block;">|border-c<span style="margin-left:8px;">=</span><span style="margin-left:8px;">''#2475cd''</span> </span><span style="display:block;">|text-c<span style="margin-left:24px;">=</span><span style="margin-left:8px;">''#444444''</span> </span><span style="display:block;">|icon<span style="margin-left:40px;">=</span><span style="margin-left:8px;">''File:Crystal Clear app clock.svg''</span></span>'''}}'''
More information Parameter, Default value ...
Parameter | Default value | Possible values | Description | Required | ||
---|---|---|---|---|---|---|
Name | Meaning | |||||
(1 ) |
time zone abbreviation[1] | none | any abbreviation supported by both {{Current hour in time zone}} and {{Current minute in time zone}} (e.g. EST ) |
The abbreviation of your time zone. If dst=no , different types of abbreviations of the same time zone (e.g. CET and CEST ) will produce different results. Otherwise (i.e. automatic daylight saving time adjustment is enabled, which is the default), the results will be the same and the abbreviations can be used interchangeably. |
yes[2] | |
or | (1 ) |
hour offset[1] | none | any positive or negative whole number (e.g. -3 , 1 , 5 ) |
The hour offset from UTC time, given instead of a time zone abbreviation. Note that the time will not be automatically adjusted according to daylight saving time when using this option. | |
(2 ) |
minute offset | 0 |
any positive or negative whole number (e.g. -30 , 45 ) |
The minute offset from UTC+(hour offset) time. Has only effect when an hour offset is being used. | no | |
12h |
12-hour clock | no |
yes or no |
Either parameter can be used to get a 12-hour clock instead of a 24-hour clock. | no | |
24h |
24-hour clock | yes |
yes or no |
no | ||
dst |
auto daylight saving time | yes |
yes or no |
Automatic daylight saving time adjustment toggle. Use dst=no to disable the automatic adjustment; this affects the chosen time zone abbreviation type (as discussed above). Has only effect when a time zone abbreviation is being used and when DST is usually being observed in (part of) that time zone. |
no | |
place |
geographic place name | none | any place name, possibly wikilinked | The name of the place where you live, for example, which will be added between parentheses behind the text. This also adds [[Category:Wikipedians in <place>]] to your user page if that category exists (but only if the place is not wikilinked). |
no | |
text |
alternative prose | where this user lives |
any line of text | Use to insert your own text. | no | |
bg-c |
userbox background color | #e2f2ff |
any web color | Use to set a different background color. | no | |
border-c |
userbox border color | #2475cd |
any web color | Use to set a different border color. | no | |
text-c |
userbox text color | #444444 |
any web color | Use to set a different text color. | no | |
icon |
clock icon | File:Crystal Clear app clock.svg |
any image | Use to set a different icon. | no | |
Close
Examples
More information Result, Code ...
Result | Code | |||
---|---|---|---|---|
|
{{User:Thayts/Userboxes/DST in user time zone|CET}} | |||
|
{{User:Thayts/Userboxes/DST in user time zone|CET|dst=no}} | |||
|
{{User:Thayts/Userboxes/DST in user time zone|EST|12h=yes|place=New York City}} | |||
|
{{User:Thayts/Userboxes/DST in user time zone|12|text=UTC in twelve hours}} | |||
|
{{User:Thayts/Userboxes/DST in user time zone|4|30|text=in Afghanistan}} | |||
{{User:Thayts/Userboxes/DST in user time zone|-4|-30|text=in [[Venezuela]]}} |
Close
The above documentation is transcluded from User:Thayts/Userboxes/DST in user time zone/doc. (edit | history)
Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages.
Add categories to the /doc subpage. Subpages of this page.
Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages.
Add categories to the /doc subpage. Subpages of this page.