Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

bobright

macrumors 601
Original poster
Jun 29, 2010
4,817
34
Here is what it says in the Lockbackground.html not sure what to change though to add AM/PM? It says remove /* but it was removed already by default and it doesn't display it. Any help would be appreciated.


<!-- Remove the /* from under this line to display am or pm after the 12 hours clock -->

// Choose either "AM" or "PM" as appropriate
var timeOfDay = ( currentHours < 12 ) ? "AM" : "PM";
// Convert the hours component to 12-hour format if needed
currentHours = ( currentHours > 12 ) ? currentHours - 12 : currentHours;
// Convert an hours component of "0" to "12"
currentHours = ( currentHours == 0 ) ? 12 : currentHours;
// Compose the string for display
var currentTimeString = timeOfDay;
// Update the time display
document.getElementById("ampm").firstChild.nodeValue = currentTimeString;
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.