Plantilla:Fecha y hora

De Guild Wars 2 Wiki
Ir a la navegaciónIr a la búsqueda

Description[editar]

This template uses Widget:Fecha y hora to turn a format and a time value into a representation similar to that of {{UTC hora}}.

Usage[editar]

{{Fecha y hora|<format>}}
{{Fecha y hora|<format>|<time>}}
{{Fecha y hora|<format>|<time>|ns=<no script text>}}

Parameters[editar]

1 (unnamed parameter)
A format string specifing the desiered output. These format strings function similar to those of #time. All supported codes can be found listed in the example on the widgets page. Meaning can be escaped by either puting what is to be taken literaly inside double quotes (") or by prefixing it with a backslash (\). To use a double quote inside of a double quoted section it can be prefixed with a backslash.
2 (unnamed parameter)
Optional. A time value as understood by #time.
If not specified the current time is used.
ns
Optional. The text that should be displayed if scripting is unavailable.
If not specified defaults to the value of unnamed parameter 2 formated via #time using either the format provided via unnamed parameter 1 or c if the provided format contains backslash escaped double quotes or exceeds the 1,000 character limit imposed by #pos.
sitenotice
Optional. Set to y when using the template in the sitenotice to cause the template to pass a different namespace to the widget to prevent datetimes from intermingling with each other due to duplicate IDs caused by distinct ID counts being maintained by the Widget extension for the sitenotice and article content.

Examples[editar]

* {{Fecha y hora|"Hoy es" F d, Y.}}
* {{Fecha y hora|"Hace un día fue" d F, Y.|-1 days}}
* {{Fecha y hora|"El 17 de junio de 2020 fue un" l.|2020-06-17}}
* {{Fecha y hora|"La época segunda de \"1234567890\" se traduce a" c.|@1234567890}}
{{#vardefine: tyriandaystart | {{#time: H:s | @{{#expr: {{#time: U}} - ( {{#time: U}} mod (2*60*60) ) }} }} }}<!--
-->* El día de Tyria actual (basado en [[Día y noche|Hora de Tyria]]) comenzó a las {{Fecha y hora| H:s ("UTC"P) | {{#var: tyriandaystart}} | ns = {{#var: tyriandaystart}} (hora del servidor) }}. {{#info: La hora que se muestra aquí podría estar atrasada debido al almacenamiento en caché de la página wiki.}}
  • Hoy es mayo 08, 2024.
  • Hace un día fue 07 mayo, 2024.
  • El 17 de junio de 2020 fue un miércoles.
  • 2009-02-13T23:31:30+00:00
  • El día de Tyria actual (basado en Hora de Tyria) comenzó a las 06:00 (hora del servidor). La hora que se muestra aquí podría estar atrasada debido al almacenamiento en caché de la página wiki.