Retired

What time is it? (retired)

738 of 1,666northms

Description:

Given a time in AM/PM format as a string, convert it to 24-hour military time time as a string.

Midnight is 12:00:00AM on a 12-hour clock, and 00:00:00 on a 24-hour clock. Noon is 12:00:00PM on a 12-hour clock, and 12:00:00 on a 24-hour clock

Try not to use built-in Date/Time libraries.

Examples

"07:05:45PM"  -->  "19:05:45"
"12:00:01AM"  -->  "00:00:01"
"11:46:47PM"  -->  "23:46:47"
Date Time
Fundamentals

Stats:

CreatedJun 28, 2016
Warriors Trained3352
Total Skips58
Total Code Submissions10754
Total Times Completed1666
JavaScript Completions769
C# Completions194
Python Completions738
Ruby Completions7
Total Stars50
% of votes with a positive feedback rating89% of 304
Total "Very Satisfied" Votes243
Total "Somewhat Satisfied" Votes53
Total "Not Satisfied" Votes8
Total Rank Assessments8
Average Assessed Rank
7 kyu
Highest Assessed Rank
6 kyu
Lowest Assessed Rank
8 kyu
Ad
Contributors
  • northms Avatar
  • anter69 Avatar
  • donaldsebleung Avatar
  • hobovsky Avatar
  • baduker Avatar
Ad