Retired
What time is it? (retired)
738 of 1,666northms
Loading description...
Date Time
Fundamentals
View
This comment has been reported as {{ abuseKindText }}.
Show
This comment has been hidden. You can view it now .
This comment can not be viewed.
- |
- Reply
- Edit
- View Solution
- Expand 1 Reply Expand {{ comments?.length }} replies
- Collapse
- Spoiler
- Remove
- Remove comment & replies
- Report
{{ fetchSolutionsError }}
-
-
Your rendered github-flavored markdown will appear here.
-
Label this discussion...
-
No Label
Keep the comment unlabeled if none of the below applies.
-
Issue
Use the issue label when reporting problems with the kata.
Be sure to explain the problem clearly and include the steps to reproduce. -
Suggestion
Use the suggestion label if you have feedback on how this kata can be improved.
-
Question
Use the question label if you have questions and/or need help solving the kata.
Don't forget to mention the language you're using, and mark as having spoiler if you include your solution.
-
No Label
- Cancel
Commenting is not allowed on this discussion
You cannot view this solution
There is no solution to show
Please sign in or sign up to leave a comment.
This kata is a subject to deduplication process here: https://github.com/codewars/content-issues/issues/198.
Please join the discussion to help us identify duplicate kata and retire them.
Retired as a duplicate.
Only two example tests?
You can add more when solving, that's what the "sample tests" snippet is for.
Thanks. All this time I didn't realize you could do that.
First of all 12:00:01AM doesn't exist, it is 00:00:01AM so the tests are incorrect.
I can see how various (more and less reliable) sources lean rather towards the version that it is indeed "12:XX a.m.":
Additionaly, in my country (not English speaking one) time past midnight is pronounced as "past twelve", so at least in some locales, the "12:XX" for after midnight seems to hold.
My computer also shows 12:14 AM after changing regional settings to English (United States):
From a 12-hour clock country, it's 12:00:01AM not 00:00:01AM. Closing issue
This comment has been hidden.
see this for how to post your code and ask for help
the problem is in your code, there is no
:
beforeAM
/PM
There is an error in one of the random tests for JavaScript.
It reads:
expected '0:00:01' to equal '00:00:01'"
even though my output is definitely'00:00:01'
Here's the console.log for my two cases:
You don't test the right input.
This comment has been hidden.
If it doesn't pass the tests, it doesn't return the right answer. No way it can be different: that's what tests do: compare your output with the expected one and display the corresponding message if they don't match.
Use markdown tags to format your code or it's not usable. Refer to the documentation about this and more: https://docs.codewars.com/training/troubleshooting/#post-discourse The code you provide is incorrect, it throws a SyntaxError.
I strongly advice you to read carefully this: https://docs.codewars.com/training/troubleshooting/
Please use new python test framework.
Done.
Soooooo, normal time?
This Kata is incomplete. Wrong test cases and random tests. Why the hell 12.00.00AM should be 00.00.00 in military time? It is just wrong.
So if the input is '12:00:01', why on Earth would you expect an output of '00:00:01'. This is without a 'PM' at the end. Surely it would not pass? rather than convert one 24 hour time to another....
Language? (I guess JS)
I don't see any such test in JS/Python, should this be closed ?
This issue has been raised again here https://www.codewars.com/kata/57729a09914da60e17000329/discuss#64b0fdf456320e11e37ccb43 and after some googling I think they both are invalid, but I will try to find someone who actually lives in a place which uses 12h time and confirm.
this is a separate issue though, OP claims there was a test with a different input format
no answer from OP
Ruby translation kumited (including random tests) -- please review and approve :-)
Any love for the now-updated ruby translation?
No random tests in python
The same issue for Javascript (no random tests as well)
Python translation added. Please check.
Please add random tests
This comment has been hidden.
No Preference.
It seems that in C# test cases expected and result parameters are in wrong order (in that Assert.AreEqual method call) leading for example to the following error:
Expected string length 7 but was 8. Strings differ at index 1. Expected: "0:00:01" But was: "00:00:01"
Nice kata anyway :)
Good catch! This has been corrected.
Thanks!
I'm still having this issue, also using C#. My "Expected:" value is the one that changes when I edit my code while the "But Was:" value stays the same. Not a huge deal but I definitely had to take a second look.
Great job on the fixed tests but would be even better if there were a few random tests :D
Please use assertEquals in javascript, because calling the function twice for one test will confuse the user. :)
Awesome suggestion! That syntax makes it easier for both the user and the kata writer!
oh yeah! ;D
I think there are only a few adjustments I would implement in order to make this kata ready for approval. First, I would add descriptions to the test cases that indicate why the test failed. Second, I would add a link to the Wikipedia page (or similar) that describes how military time works, in case the user is still confused after reading the kata instructions. Lastly, I would add some more descriptive tags for this kata.
Thanks for your feedback. I made the improvements around the javascript tests that you suggested (just being told it was wrong was pretty pathetic, now error messages are actually helpful), as well as added some tags and a link to more information on military time.
Thanks!
The testing has no relationship to the the instructions. It seems that the author accidently published this as beta. As it is now, it should be removed, until ready.
I did not realizet that Javascript was enabled by default at the time of publishing, and though I was only publishing for C#. This issue has been addressed.
Thanks.
This comment has been hidden.
Javascript was enabled for new Kata by default, this kata does not yet support javascript. It has been disabled and re-published. Hopefully a javascript version will be ready soon.
Thanks
closing the issue.
Javascript support has been added. Thanks!