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



Leave a comment