Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to convert time to am pm in javascript

var suffix = hour >= 12 ? "PM":"AM";
var hours = ((hour + 11) % 12 + 1) + suffix
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #convert #time #pm #javascript
ADD COMMENT
Topic
Name
1+2 =