Menu
Home
About
Projects
Feedback
Devlog
Notes
Contact
Home
About
Projects
Feedback
Devlog
Notes
Contact
Notes
Converting 24 hour time to 12 hour time using Javascript
Edit on GitHub
Jun 3, 2014
JavaScript
1
// convert hours to 12-hour format
2
hours
=
((
hours
+
11
)
%
12
+
1
);
Links
StackOverflow: Convert date to another timezone in JavaScript
Browse all topics
Algorithms
Amazon Web Services (AWS)
Android
APIs
Armbian
Bash Scripting
C#
Cheatsheets
Commands
CSS & Sass
Databases
DevOps
Docker
DRAFTS
Expo
Fastlane
Firebase
Flutter
Gatsby
Git & Github
Go
GraphQL
Hardware
Hugo
iOS
JavaScript
Jekyll
JS Interview Prep
Linux
Load Go modules from private repos
macOS
Misc.
Node
Node API
OpenCart
Personal
PHP
Programming
Python
Raspberry Pi
React Native & Expo
ReactJS
Redux
Serverless
System Administration
Typescript
Ubuntu
Web Development
WordPress
Workflow