Content last modified Monday 3 September 2018
hop to #bottom
Categories:
Author:
Current version:
0.3
About It:
Get it:
Rate it:
  • Helpful?
  • 1 Yes
  • 0 No
Flag it:

If you'd like to provide updated information and do not have access to directly edit, please contact the site admin; thanks!

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

You know you want to visit the Archives.
Published with Textpattern