ਫਰਮਾ:Digital clock/doc
This clock uses one of the most complicated structures to produce an digital clock that displays time in the offset you set!
Usage
ParametersAll parameters given below are optional and not necessarily be used.
OffsetThe clock has a parameter that allows you to give an offset from UTC time. The offset can be fractional to adjust the time by any number of hours and minutes. Therefore this code -
Format (12 or 24 hours)
You can set the format parameter to 12 or 24 to get a 12 or 24 hour time format! 12 hour clocks get an additional segment space for displaying am/pm. Therefore
Size
You can set nearly all sizes for the clock to display. It defaults to 70x112px. To set a size of 20 pixels you will have to type
Color
You can set all types of colors for the clock to display. It defaults to red. You can use a HTML color code or directly write the color name. To display a clock with cyan color you will have to type
BordersThis is actually not a parameter but a way to design different types of borders for the clock. Normal HTML can be used to add borders and padding space. One tricky bit is that <div> elements expand to the full width of their container, which will make the box too wide. So we must specify an exact width for it, by multiplying the segment size by 5 (for 24-hour clocks) or 6 (for 12-hour clocks): A complete list of borders is available at the User Page Design Center
Vertical clocksWrapping the clock in a <div> with the same width as the segments will make it vertical. Borders work as normal. The vertical clock isn't displayed to prevent inconvenience but this code works perfectly.
Random colorsParser magic can be used to pick a random color each time the page is generated. Use the following code to pick random colors from the colors specified. Note - You can change the colors given according to your preference. This code will produce the clock given below.
See alsoMultiple units of time
Single units of time
Date and time templates made for substitution:Month: Individual templates
Categories of templates |
Portal di Ensiklopedia Dunia