Content last modified Monday 6 March 2017
hop to #bottom
Categories:
Author:
Current version:
0.3
About It:
Get it:
Rate it:
  • Helpful?
  • 1 Yes
  • 0 No
Flag it:
Contact Reason [ ? ]

cjs_countdown

An improved (imho) version of glx_countdown.

Attributes

year
month
day
hour
minute
delimiter – defaults to “, “
timezone – your timezone measured in GMT
format – string specifying units of time to use, defaults to “ymwdhms”

Examples

<p>New Year in <txp:cjs_countdown year=“2008” month=“1” day=“1” hour=“0” minute=“0” timezone=”+10” format=“hms” /></p>

<p>New Year in <txp:cjs_countdown year=“2008” month=“1” day=“1” hour=“0” minute=“0” timezone=”+10” format=“hm-” /></p>

<p>New Year in <txp:cjs_countdown year=“2008” month=“1” day=“1” hour=“0” minute=“0” timezone=”+10” format=“ymwdhm-” /></p>

Notes

Example one shows basic usage. Note that you can omit characters from the beginning of the format string if you don’t want to use them, but not from the end.

Example two shows how to omit from the end of the format string. If I want to show hours and minutes, but not seconds, you need to replace the ‘s’ representing seconds with a dash (’-’). If you wish to omit characters in the middle of the string you need to use this method too.

The last example uses all units of time except seconds: y ears, m onths, w eeks, d ays, h ours, and m inutes.

Also note that the timezone isn’t adjusted with PHP5’s new timezone functions, but does correctly adjust the timezone taking into account the server’s timezone too.

Update

The latest update, cjs_countdown now counts time FROM a certain date when one of your countdown dates is passed.

Article Request Count:
Keywords/tags:
Initially released:
05/05/2007
Posted here:
05 May 2007
Article modified:
25 Jun 2007

If there is a comment form at the Information URL, you may want to leave your comments/questions there for quicker feedback. Otherwise, comment away:

Your comment will NOT be submitted until you click the 'Submit' button on the next pageload.

Commented (2)

Just an update, new version with new features is out.

I tried the plug-in and have a question. Can the output string have more formatting options?

Subscribe to this article's comments RSS feed. [ ? ]   View Recent Comments across the site.

You know you want to visit the Archives.

Browse

Categories


Articles

There are also tag clouds, 'cause those are fun.
Published with Textpattern