Holy cow, I wrote a book!
For formatting time spans,
you can use the
but the result is a dorky
Why isn't there a
format that is fancier like
hh hours, mm minutes, and ss.ffff seconds?
hh hours, mm minutes, and ss.ffff seconds
You have the complexities of natural language to thank.
In the general case,
there is not enough information to provide the appropriate
grammatical context in order to know the correct format.
This isn't a big deal in English,
since English words typically do not inflect for case
(pronouns and genetive being the most commonly-encountered exceptions),
but in many other languages,
choosing the exact form of the word "hours"
depends on grammatical information that cannot be captured
in a simple call to GetLocaleInfo.
For example, if you wanted to say
"Last modified hh hours, mm minutes, and ss.ffff seconds ago",
the word "hours" would need one form,
whereas if you had wanted to say
"Active for hh hours, mm minutes, and ss.ffff seconds",
the word "hours" would need a different form.
Some languages have quite a large number of grammatical cases
(I'm looking at you, Finnish),
and expressing all of this programmatically in a uniform way
across all languages is impractical.
The preposition since might take the accusative case
in one language,
but the genitive in another.¹
And we haven't even gotten into the crazy world of
or whether zero is singular or plural.
The language folks may have realized that they didn't want
to dig themselves into a hole like they did with
And then there's German, where some prepositions take multiple cases
depending on context.
Consider, for example, the preposition unter,
I've internalized the rule for deciding which case to use,
so much so that it's hard for me to explain it,
but I'll try anyway.
If the preposition applies throughout
the entire activity, you use the dative.
But if the point of the sentence is that situation changed from
"not applicable" to "applicable"
(in our example, from "not under" to "under"),
then use the accusative.
This is usually described in grammar books as change of position
or motion toward a goal.