n days till YAPC::NA in Chicago!

|

I'm so excited to be going to YAPC this year!

I wrote a little script to count down the days till YAPC chicago. Being a Perl conference I wrote a perl script to write JavaScript :-) I know... I made it harder on myself than I had to, but how could I not do it in Perl?!?!

This javascript just has one function that returns the days till YAPC (or 8am on June 26), it's called days2yapc().

Place this in your (x)HTML:

<script src="http://silent11.com/cgi-bin/days2yapc.pl" type="text/javascript" language="javascript"></script>

After calling it you could do something like this:


document.write( Math.floor(days2yapc()) + ' days till YAPC in Chicago.');

or have some fun with images like this:


for(i=1; i<Math.floor(days2yapc()); i++) {
  document.write('<img src="http://silent11.com/includes/day.gif" />');	
} 

The first example would output this:

The second example would output this::

Have fun.

I've found that Math.round() works better than Math.floor

About this Entry

This page contains a single entry by Will published on June 16, 2006 7:38 PM.

Nesting was the previous entry in this blog.

DevBoi is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.

Powered by Movable Type 4.01
Support this site by opening up a hosting account with site5.com
Powered By Site5.com