Somebody asked me if it’s possible to use the (system) clock to display particulary stuff? I’m using http://json-time.appspot.com/time.json
For example:
When the clock is between monday and thursday then display “message1”. When it’s between friday and sunday display “message2”.
What I have is:
<script type="text/javascript">
$(document).ready(function(){
var timezone = "Europe/Berlin";
$.getJSON("http://json-time.appspot.com/time.json?tz="+timezone+"&callback=?",
function(data){
if (data.datetime < ??) { // what do I have to do here?
alert ("It's monday-thursday in "+timezone);
} else {
alert ("It's friday-sunday in "+timezone);
}
})
});
</script>
What do I have to do with “??” ? Any help is more then welcome
I assume you want something like this:
DEMO: http://jsfiddle.net/sXbUv/