The new countdown timer

Only tangentially related to this post, but interesting nonetheless, are various online responses to Szemeng’s letter to the ST forum about social mobility and the scholarships system in Singapore: two from From a Singapore Angle ([1], [2]), another from Zuco.

As possibly part of his statistic (that 75% of scholarship-holding Singaporean students at Stanford who don’t live in HDB flats), I feel that I should demonstrate how truly ungrateful I am for having had the chance to study overseas for free by being able to remind myself of how long more I’m bonded for. The new countdown timer on the sidebar shows exactly how many days I have left until my bond is up, and assuming a base value of $500,000 for the bond with interest (I think that’s what was stated on my contract, higher than usual because of NIE), how much I’d have to pay back if I broke it right this second.

If anyone else wants to use it, here’s the pluggable PHP code to put in your HTML. The two end dates are for those who’ve completed NS — I’m assuming 10 months of it counted towards the bond, although is only the case if the bond is completed.

<?php
$end_date_break = "20 June 2011 00:01";
$end_date_endure = "20 August 2010 00:01";
$start_date = "20 June 2005 00:01";
$bond = 500000;

$seconds = strtotime($end_date_endure) - strtotime("now"); $hours = $seconds / 3600; $days = floor($hours / 24); echo $days . " days and \$"; $total = strtotime($end_date_break) - strtotime($start_date); $seconds2 = strtotime($end_date_break) - strtotime("now"); $remaining = $seconds2 / $total * $bond; echo number_format($remaining, 2, '.', ',') . " away from freedom\n"; ?>

The depressingly large debt I seem to have signed myself into aside, it’s mildly amusing to keep refreshing the page to see the bond value go down by a few cents. Edit: Stupid blogging software, "smartening" all the damn quotes. Gah!

Actually, the real reason I thought about coding that little snippet up? A good friend is moving on from being bonded to hopefully much greener pastures. Good luck, you.

4 thoughts on “The new countdown timer

  1. Hey would you be a dear and do it in Javascript so that it’s more accessible to all of us who use public blog engines? When you haven’t programmed in 4 years even the simplest script in an unfamiliar language looks daunting :'(

Comments are closed.