Fullscreen
[Show/Hide Right Column]

Show the time until or after a date and time

Plugin Countdown

This Wiki Plugin displays a countdown to a future date. Or, if parameter start is set, also since a date in the past.

The enddate value provided by the user is converted from the user's local time to GMT/UTC date and time. Thus values will show hours until or since the current hour in GMT/UTC, not compared to local time.



Usage and Parameters

To use this plugin in a wiki page, use the syntax:
Syntax for COUNTDOWN plugin
{COUNTDOWN(enddate=>April 1 2020)}countdown message{COUNTDOWN}


Parameter Accepted values Default Effect Required? Since
enddate Dates in multiple formats: Apr(il) 1 2020, 1 Apr(il) 2020, Apr-01-2020, 01-Apr-2020, 01-04-2020, 04/01/2020 none Displays number of days, hours, minutes and seconds until the enddate y
locatetime on or off on if set to off, shows date only (no time fields displayed) optional ?
show d=days, h=hours, m=minutes, s=seconds. Enter multiple values as: dh or dhm or dhms. dhms, unless locatetime=off specified, in which case no time components are shown specify which time components to be shown optional ?
since y or n y (v.6) n (v.4) whether to also provide countdown if enddate is in the past If set to y and value of enddate is in the past plugin returns days (and if asked, time) SINCE the date. If set to n and the value of enddate is in the past, the value returned will simply be the text string countdown message followed by the text string is over. ?
countdown message (text between the COUNTDOWN tags) string none Appends a text message to the end of the countdown n


Examples

1. This code,
{COUNTDOWN(enddate=>01-Apr-2020)} __the project is done!__ {COUNTDOWN}

arrow-right.png
Would produce:
2978 days, 21 hours, 11 minutes, 14 seconds, until the project is done!


2. This code,
{COUNTDOWN(enddate=>01-Apr-2010)} __the project start date__ {COUNTDOWN}

arrow-right.png
Would produce:
674 days, 2 hours, 48 minutes, 45 seconds, since the project start date.


3. This code,
{COUNTDOWN(enddate=>01-Apr-2010,show=dhm)} __the project start date__ {COUNTDOWN}

arrow-right.png
Would produce:
674 days, 2 hours, 48 minutes, since the project start date.


4. This code,
{COUNTDOWN(enddate=>01-Apr-2010,show=d)} __the project start date__ {COUNTDOWN}

arrow-right.png
Would produce:
674 days, since the project start date.


5. This code is a variant of the previous
{COUNTDOWN(enddate=>01-Apr-2010,locatetime=off)} __the project start date__ {COUNTDOWN}

arrow-right.png
and would thus produce the same result as the previous example
674 days, since the project start date.


6. while this code,
{COUNTDOWN(enddate=>01-Apr-2010,since=n)} __the project start date {COUNTDOWN}__

arrow-right.png
should produce:
the project start date is over
but doesn't.

The software used by doc.tiki.org needs to be fixed. A correction is being submitted.


{SPLIT(colsize=>200|50|350)}

7. instead, this code,
{COUNTDOWN(enddate=>01-Apr-2010,since=y)} __the project start date {COUNTDOWN}__


arrow-right.png

produces:
{COUNTDOWN(enddate=>01-Apr-2010,since=y)}


{SPLIT}



Contributors to this page: lindon5651 points  , olinuxx128 points  , Olaf-Michael Stefanov786 points  , piedramania35 points  , sylvie7154 points  and Tom Jarvis71 points  .
Page last modified on Saturday 07 January, 2012 03:10:31 UTC by lindon5651 points .
The content on this page is licensed under the terms of the Creative Commons Attribution-ShareAlike License.

Site Language

Reference Guide

Keywords

These keywords serve as "hubs" for navigation within the Tiki documentation. They correspond to development keywords (bug reports and feature requests):



Tiki Newsletter

Delivered fresh to your email inbox!
Newsletter subscribe icon
Don't miss major announcements and other news!
Contribute to Tiki