132
rated 0 times
[
133]
[
1]
/ answers: 1 / hits: 106925
/ 11 Years ago, sat, june 8, 2013, 12:00:00
I have buttons with the names of big cities.
Clicking them, I want to get local time in them.
$('#btnToronto').click(function () {
var hours = new Date().getHours();
var hours = hours-2; //this is the distance from my local time
alert ('Toronto time: ' + hours + ' h'); //this works correctly
});
But how can I get AM or PM ?
More From » jquery