Advertisement
Stwor

Untitled

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