I searched for an answer to this question, but all I found is how to show 12-hour versus 24-hour time format rather than when to do that.
My question is similar to this one: How to determine if current culture/locale uses am/pm or 24-hour time? but I want to know if we have similar structure to CurrentCulture or CultureInfo in Rails.
I believe with use of locales it should be possible, but I do not know how to do it or if there is any database explicitly mentioning which languages use military format (24-hour) and which use AM/PM format.