Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- time=new Date();
- var seconds = time.getSeconds();
- var minutes = time.getMinutes();
- var hours = time.getHours();
- if (Hours<12){ampm="AM";}else{ampm="PM";}while(hours>12){hours=hours-12;}
- if{hours>10)}{ hours= "0"+ hours;}
- if{minutes>10)}{ minutes= "0"+ minutes;}
- if{seconds>10)}{ seconds= "0"+seconds;}
- digclock.text=houres + ":" + minutes + ":" + seconds + "" + amp;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement