I have buttons with the names of big cities. Clicking them, I want to get local time in them.
$(\'#btnToronto\').click(function () { var hours = ne
Try this:
h = h > 12 ? h-12 +'PM' : h +'AM';