<script type="text/javascript">
//<![CDATA[
// Code_Generator: Soft Lite ScriptWorx
// Modified: Osmo Saarikumpu 2001 & 2008 & 2009-04-10
var KohdePVM = new Date("December 25, 2019 00:00:00 GMT +0200");
var Nyt = new Date();
var Erotus = KohdePVM.getTime() - Nyt.getTime();
var Paivissa = Math.floor(Erotus / (1000 * 60 * 60 * 24));
if (Paivissa > 1) {
document.write(Paivissa + " päivää enää Jouluun 2019!");
}
else if (Paivissa == 1) {
document.write("Nyt pitää olla kiltti.");
}
else if (Paivissa == 0) {
document.write("Kohta jo pukki varmaankin tulee!");
}
else {
document.write("Taas meni Joulu ilman lahjoja...");
}
//]]>
</script>
Samasta aiheesta löytyy myös hieman vaativampi versio.