Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
If you need a tip to solve this kata (i did), stop trying
Date.toLocaleDateString
or anyDate
method. Use a different approach ;)And IMO, it's not 7kyu
Really sorry. I don't know what what description I was reading when I left the comment. I will triple check description next time.
Isn't that already in the description?
Should be stated in the description that formats are provided
See ZozoFouchtra post below.
Seems like this was never done? It isn't working for me 4 years later and still very few have completed this kata.
Why I can't use
Date.prototype.toLocaleDateString(loc)
to change the time place.For example, at my vscode ->
getDate(1481020142, "ko-KR")
output:2016. 12. 6.but when I test the case. output:2016-12-6
why ???
approved
I also fixed the author's random tests (it's testing the user solution against... itself, so it's always vacuously true.)
For the reference: https://github.com/Codewars/codewars-runner-cli/issues/527
I guess you're right. I'll add it along with random tests.
Thanks for the feedback! =)
It seems
.toLocaleDateString
doesn' t work (Intl.DateTimeFormat.supportedLocalesOf
returns an empty array ) so I think it would be better to add yourformats
object in "Preload" section to let warriors use it. This way they'll be able to format output strings.May the Code be with you!
; ) )