DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
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
COMMENT
Name
1+2 =
Submit