Skip to content

Latest commit

 

History

History
65 lines (46 loc) · 3.23 KB

File metadata and controls

65 lines (46 loc) · 3.23 KB

Table of Contents

Usage

{{InlineDateTime}} (or the short alias {{InlineDateTime}}) displays an inline datetime or date range with automatic timezone conversion for the reader. Times are shown with a tooltip providing conversions to the reader's local time and/or server times.

Parameters

Parameter Required Description
start or 1 Yes Start datetime in YYYY-MM-DD HH:MM format. Append a UTC offset (+8, -5, +05:30, UTC+8, GMT-5) for absolute times. Omit the offset for server time.
end or 2 No End datetime, same format as start. If the date matches start, only the time portion is shown in the fallback display.
server No Restrict tooltip to a specific server: asia or americas. Omit to show both.
raw No Raw display text override. The original text is shown as-is; start/end are still used for tooltip calculations.

Timezone behavior

  • No offset (start=2026-03-12 12:00): Treated as server time. The same wall-clock time applies to each server independently. Tooltip shows the reader's local time for each server.
  • With offset (start=2026-03-12 06:00 +8): Treated as an absolute moment. Inline display shows the reader's local time (with their timezone abbreviation). Tooltip shows each server's local time.
  • Start and end can have different timezone types (e.g., absolute start, server-relative end).

Server definitions

Server UTC Offset Notes
Asia UTC+8 Fixed offset, no DST
Americas / Europe UTC-5 Fixed offset, no DST (EST year-round)

Examples

Server time range (most common):

{{InlineDateTime|start=2026-03-12 12:00|end=2026-03-29 12:00}}
What it looks like:

Absolute time (maintenance window):

{{InlineDateTime|start=2026-03-12 06:00 +8|end=2026-03-12 12:00 +8}}

Single point in time:

{{InlineDateTime|start=2026-03-12 12:00}}

With server filter:

{{InlineDateTime|start=2026-03-12 06:00 +8|end=2026-03-12 12:00 +8|server=asia}}

With raw text (for dev notes):

{{InlineDateTime|start=2026-03-12 06:00 +8|end=2026-03-12 12:00 +8|raw=Mar. 12, 2026 at 06:00 - Mar. 12, 2026 at 12:00 (UTC+8)}}

The short alias {{IDT}} works identically if installed.

No-JavaScript fallback

Without JavaScript, the template displays dates in a readable format with the timezone context (either the UTC offset or "server time"). Tooltips are not available without JavaScript.

Error handling

If start is missing or blank, the template renders a visible hard error in red. If start or end is present but cannot be parsed, a soft error is shown with the original text instead. Both states add the page to :Category:Pages with InlineDateTime errors for editor review.