Implement C's Switch in Python 3
On 4/02/19 10:00 AM, Christian Gollwitzer wrote:
> Am 03.02.19 um 09:32 schrieb DL Neil:
>> Now back to ordinal dates - the "st", "th", etc suffixes only work in
>> English. You'd need another list (but no great coding complexity) to
>> cope with a second, third, ... language!
> Only for some languages. In other languages there can be, for example,
> cases (inflections). Then the suffix not only depends on the number, but
> also on the case, which is governed by e.g. a preposition or the use in
> the sentence. Slavic languages have 6 or 7 cases.
I was unaware of that - not having had to cope with any of the Slavic
languages, to-date. Are multiple cases/inflections used for dates?
French has two, including both male and female ordinals, but only one
applies to dates!
> Of course you can make the list two-dimensional to cover that, but then
> another language will appear which has yet another different thing....
> Basically you'll need to rewrite the whole thing when going to a
> completely different language.
However, such limitation also applies to the 'case solution', and worse,
if that additional language/those languages' exceptions apply to
different values, eg 1st, 11th, 2nd, 3rd which are "hard-coded" in the
Not good science, but I have been sampling my correspondence today,
inspecting letters, emails, etc, for date-formats. Guess how many use
ordinals? Stuff from the US tends to use numerics in the mm/dd/ccyy
convention. Stuff from the UK and British Commonwealth (excluding
Australia) tends to use month-words or abbreviations (but not ordinals).