From Dark and Darker Wiki

No edit summary
Tag: Manual revert
(Adjusting the countdown date to be UTC)
Tag: Reverted
Line 8: Line 8:
var <!--{$uniqueId|default:'timer'|escape:'html'}--> = setIntOnStart( _ => {
var <!--{$uniqueId|default:'timer'|escape:'html'}--> = setIntOnStart( _ => {
     let id = "<!--{$uniqueId|default:'timer'|escape:'html'}-->";
     let id = "<!--{$uniqueId|default:'timer'|escape:'html'}-->";
     let countDownDate = new Date('<!--{$date|escape:'quotes'}-->').getTime();
    let timezoneOffset = new Date().getTimezoneOffset()*60*1000;
     let countDownDate = (new Date('<!--{$date|escape:'quotes'}-->').getTime()) + timezoneOffset;
     let now = new Date().getTime();
     let now = new Date().getTime();
     let distance = countDownDate - now;
     let distance = countDownDate - now;

Revision as of 18:27, 10 December 2024

Parameters

uniqueId
  • Determines element id name
  • Name needs to be unique if multiple widgets are to be displayed on the same page.
  • Default: timer
date
  • String of text indicating a date and time.
    • Example:2024-12-31 23:59:59

Example 1

{{#widget:Countdown|uniqueId=A|date=2025-08-26 23:59:59}}

Example 2

{{#widget:Countdown|uniqueId=B|date=2024-12-31 23:59:59}}

Example 3

{{#widget:Countdown|uniqueId=C|date=2024-08-24 23:59:59}}