12 July 2003
I’ve made a bookmarklet to show what’s on next Sunday at the UGC cinema in Broad Street, Birmingham. This didn’t really need to be a bookmarklet, I could have done it server-side, but since when did common sense matter?
…
Oh, all right then. I’ve compressed the code a bit, just for fun, and I’ve no idea if it’s going to break on me next week, but I’m sick of having to click on the pop-up then find the next Sunday when the only day I go there is Sunday. You can change ‘82’ to a cinema near you.
javascript:window.location='http://www.ugccinemas.co.uk/reservation/ChoixResa.jgi?CINEMA=82&DATE='+nS();function nS(){var d=new Date;var p=d.getDay();if(p>0){d=aD(d,(7-p));}var j=lZ(d.getDate())+'';var k=lZ(d.getMonth()+1)+'';var l=c(d.getYear())+'';return l+k+j;}function aD(d,j){return new Date(d.getTime()+j*86400000);}function lZ(n){if(n<10){return '0'+n;}{return n;}}function c(l){if(l<1901){return l+1900;}{return l;}}void(0);