Esta plantilla muestra un reloj digital.
{{Digital clock}}
.Todos los parámetros que se indican a continuación son opcionales y no necesariamente deben utilizarse.
{{Digital clock
|format = 12 or 24 (default: 24)
|offset = number of hours + or - UTC (default: 0)
|size = width of each digit in pixels (default: 70)
|color = any color name or HTML color code (default: red)
}}
El reloj tiene un parámetro que permite indicar una diferencia con respecto a la hora UTC. La diferencia puede ser fraccionaria para ajustar la hora en cualquier número de horas y minutos. Por lo tanto, este código {{Digital clock|offset = +5.5}}
generará este reloj:
{{Digital clock|format = 12}}
producirá: {{Digital clock|size = 20}}
y se mostrará algo como esto: {{Digital clock|color = cyan}}
y se mostrará algo como esto:En realidad, esto no es un parámetro, sino una forma de diseñar distintos tipos de bordes para el reloj. Se puede utilizar HTML normal para añadir bordes y espacio de relleno. Un aspecto complicado es que los elementos <div> se expanden hasta el ancho completo de su contenedor, lo que hará que el cuadro sea demasiado ancho. Por lo tanto, debemos especificar un ancho exacto para él, multiplicando el tamaño del segmento por 5 (para relojes de 24 horas) o 6 (para relojes de 12 horas): Hay una lista completa de bordes disponible en el Centro de diseño de páginas de usuario
<div style="background:black; padding:5px 15px; border:3px inset cyan; width:300px;">
{{Digital clock}}
</div>
<div style="background:black; padding:5px 15px; border:3px inset cyan; border-radius:15px; width:300px;">
{{Digital clock}}
</div>
Si envuelves el reloj en un <div> con el mismo ancho que los segmentos, quedará vertical. Los bordes funcionan de forma normal. El reloj vertical no se muestra para evitar inconvenientes, pero este código funciona perfectamente.
<div style="float:right; width:40px; border:5px solid black">
{{Digital clock}}
</div>
La magia del analizador se puede utilizar para elegir un color aleatorio cada vez que se genera la página. Utilice el siguiente código para elegir colores aleatorios de entre los colores especificados. Nota: puede cambiar los colores indicados según sus preferencias. Este código producirá el reloj que se muestra a continuación. {{Digital clock |color = {{#switch:{{#expr:{{#time:U}} mod 6}} |0=red |1=orange |2=lime |3=yellow |4=cyan |5=magenta}}
Mes:
{{ Lmonth }} produce sep
{{ Nmonth }} produce nov
{{ LastMonth }} produce septiembre de 2024
{{ NextMonth }} produce noviembre de 2024