Loading...
 
Display the time until or after a date and time

Plugin Countdown

This wiki plugin displays a countdown to a future date from a date in the past, together with default or custom text if desired.

Parameters

Introduced in Tiki1. Required parameters are in bold.
Preferences required: wikiplugin_countdown
Parameters Accepted Values Description Default Since
(body of plugin) Text to append to the countdown.
enddate date Target date and time. Multiple formats accepted. 1
caldays (blank)
y
n
Will use calendar day difference when set to Yes (y) and time units are not shown. Result is that tomorrow, for example, is always shown as a one day away even if less than 24 hours from now. No (n) is the default. n 9.0
since (blank)
y
n
If Yes (y), will display amount of time since the event (default). If No (n) and if there is body text, will display "is over" or custom text set in text parameter after body text. 4.2
show (blank)| y| yo| yod| yodh| yodhm| yodhms| o| od| odh| odhm| odhms| d| dh| dhm| dhms| h| hm| hms| m| ms| s Select: y=years, o=months, d=days, h=hours, m=minutes, s=seconds. Enter multiple values as: yodhms. Must be in the order of descending length, and a time unit should not be skipped. If blank, the time is shown down to the hour if not zero. 4.2
text default, silent, custom: before event|after event|after event when time not shown Text that will show with the countdown and body text. Set to default or leave empty to show "xxx days until/since body text", except that if the since parameter is set to No (n), "body text is over" will show after the end date has passed. Also, if no time is shown because of the time units being displayed (for example, only years are shown and it's less than a year before/after the end date) then "body text will happen in less than a year/happened in the last year" will show. Or set pipe-separated custom text as follows: before date|before date by less than shortest time unit shown|after date |after date by less than shortest time unit shown|after date and since set to No (n). Set to silent for no text. 9.0
thousands (blank)
c
p
s
Set the thousands separator for results of 1,000 or more. Choices are comma (c), decimal (d), space (s), or leave blank for no separator. 9.0


Examples

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

arrow-right.png
Would produce:
3 years, 3 months, 21 days and 9 hours until the project is done!
2. This code,
{COUNTDOWN(enddate="2020-03-05T22:00" show="m")} __the project is done!__  {COUNTDOWN}

arrow-right.png
Would produce:
3 years, 2 months, 26 days, 7 hours and 57 seconds until the project is done!
3. This code,
{COUNTDOWN(enddate="01-Apr-2020" caldays="y" show="yod")} __the project is done!__ {COUNTDOWN}

arrow-right.png
Would produce:
3 years, 3 months and 22 days until the project is done!

 Note for above example

Uses caldays to count calendar days even if less than 24 hours away

4. This code,
{COUNTDOWN(enddate="01-Apr-2010" since="n" text="before|is happening in less than a month|after|happened way less than a month ago|has passed")} __the project start date__ {COUNTDOWN}

arrow-right.png
Would produce:
the project start date has passed

 Note for above example

Show custom text instead of time elapsed for a date in the past.

5. This code,
{COUNTDOWN(enddate="01-Apr-2010" since="y" show="yodhms")} __the project start date__ {COUNTDOWN}

arrow-right.png
Would produce:
6 years, 8 months, 9 days, 14 hours, 59 minutes and 3 seconds since the project start date

 Note for above example

Show time elapsed since a date in the past down to the second



If you want to automatically refresh the page every 60 seconds you could either use this code:

{HTML()}<meta http-equiv="refresh" content="60">{HTML}


or get a JavaScript or jQuery plugin to get this done, maybe an Ajax call for the plugin .... if you find a better method than above, please feel free to document here.

doc.tiki.org


Bootstrap

AdminGuide

UserGuide

Keywords

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

Accessibility (WAI and 508)
Accounting (7.x)
Articles and Submissions
Backlinks
Banners
Batch (6.x)
BigBlueButton audio/video/chat/screensharing (5.x)
Blog
Bookmark
Browser Compatibility
Link Cache
Calendar
Category
Chat
Clean URLs
Comments
Communication Center
Compression (gzip)
Contacts (Address Book)
Contact us
Content Templates
Contribution (2.x)
Cookie
Copyright
Credit (6.x)
Custom Home and Group Home Page
Date and Time
Debugger Console
Directory of hyperlinks
Documentation link from Tiki to doc.tiki.org (Help System)
Docs 8.x
Draw 7.x
Dynamic Content
Dynamic Variable
External Authentication
FAQ
Featured links
File Gallery
Forum
Friendship Network (Community)
Gmap Google maps
Groups
Hotword
HTML Page
i18n (Multilingual, l10n, Babelfish)
Image Gallery
Import-Export
Install
Integrator
Interoperability
Inter-User Messages
InterTiki
Kaltura video management (4.x)
Karma
Live Support
Login
Logs (system & action)
Look and Feel
Lost edit protection
Mail-in
Map with Mapserver
Menu
Meta Tags
Mobile Tiki and Voice Tiki
Mods
Module
MultiTiki
MyTiki
Newsletter
Notepad
Payment
Performance Speed / Load
Permissions
Platform independence (Linux-Apache, Windows/IIS, Mac, BSD)
Polls
Profiles
Profile Manager
Report
Toolbar
Quiz
Rating
Feeds
Score
Search engine optimization
Search
Search and Replace
Security
Semantic links (3.x)
Shadowbox
Shadow Layers
Share
Shopping cart
Shoutbox
Slideshow
Smiley
Social Networks
Spam protection (Anti-bot CATPCHA)
Spellcheck
Spreadsheet
Stats
Surveys
Tags (2.x)
Task
Tell a Friend, alert + Social Bookmarking
TikiTests (2.x)
Theme CSS & Smarty
Trackers
Transitions (5.x)
TRIM
User Administration including registration and banning
User Files
User Menu
Watch
WebHelp
WebDAV (5.x)
Webmail
Web Services
Wiki 3D
Wiki History, page rename, etc
Wiki Page Staging and Approval (2.x)
Wiki Plugin extends basic syntax
Wiki Syntax
Wiki structure (book and table of content)
Workspace
WSOD
WYSIWYCA
WYSIWYG (2.x)
XMLRPC


Tiki Newsletter

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