Skip to content

LibreOffice possessive genitive case and partitive case month names

Poss...what? you may ask.. yes, the month that owns the day-of-month.

In some languages (and thus locales) a month name has different cases, depending on the context the name is used in. That's for example the case in Slavic languages, Greek, Russian, Finnish, Gaelic, ... and probably a few more I didn't hear of. Totally unknown to native English speakers ;-) (which I'm not)

  • a standalone month name is the nominative case, the noun, as in November
  • a possessive genitive case month name can be described as "the month's day", as in November's 17th
  • a partitive case month name can be described as "day of month", as in 17 of November

This feature in number formatting was requested for quite some time. Recently I found time to implement it. To achieve this, I added optional elements to LibreOffice's internal locale data <LC_CALENDAR><Calendar> element and implemented the general rules in the number formatter.

Locale data (submitted by localizers)
  • <MonthsOfYear> element, nominative (nouns) month names
    • always specified
    • includes <Month>, <MonthID>, <DefaultAbbrvName> and <DefautFullName> elements
  • <GenitiveMonths> element, genitive case month names
    • optional
    • follows the <MonthsOfYear> element
    • consists of same elements as <MonthsOfYear> element
    • if <GenitiveMonths> are not specified then <MonthsOfYear> names are used in the context of the number formatter's genitive case
  • <PartitiveMonths> element, partitive case month names
    • optional
    • follows the <GenitiveMonths> element, or follows the <MonthsOfYear> element if the <GenitiveMonths> element is not specified
    • consists of same elements as <MonthsOfYear> element
    • if <PartitiveMonths> are not specified then <GenitiveMonths> names are used, if that is not specified then <MonthsOfYear> names are used

Rules for use of nominative / genitive / partitive case month names in number formatter when encountering MMM or MMMM
  • MMM or MMMM immediately preceded or followed by a literal character other than space ⇒ nominative month name (noun), for Excel and backwards compatibility such as Finnish MMMM"ta"
  • no day of month (D or DD) present in format code ⇒ nominative name
  • day of month (D or DD) after MMM or MMMM ⇒ genitive name
    • no genitive names defined ⇒ nominative names
  • day of month (D or DD) before MMM or MMMM ⇒ partitive name
    • no partitive names defined ⇒ genitive names
      • no genitive names defined ⇒ nominative names
NOTE:

If only <MonthsOfYear> and <PartitiveMonths> are specified but not <GenitiveMonths>, then for MMM(M) D(D) formats the <MonthsOfYear> nominative name is displayed. Only for D(D) MMM(M) formats the <PartitiveMonths> name is displayed.

If only for MMM(M) D(D) formats the <GenitiveMonths> are to be displayed but nominative names for D(D) MMM(M), then specify <PartitiveMonths> identical to <MonthsOfYear>, do not omit it as otherwise it would inherit from <GenitiveMonths> again.

Screenshot

To illustrate, here's a screenshot using the Finnish fi-FI locale, Finnish is an extraordinary case that uses all three, nominative, genitive and partitive case month names.

Screenshot of nominative, genitive and partitive month names in Finnish.
Screenshot of nominative, genitive and partitive month names in Finnish.
Locales featuring month name cases
Currently for the following locales genitive and/or partitive case month names were contributed:
  • [an-ES] Aragonese, Spain
  • [ast-ES] Asturian, Spain
  • [be-BY] Belarusian, Belarus
  • [fi-FI] Finnish, Finland
  • [gd-GB] Gaelic (Scottish), United Kingdom
  • [la-VA] Latin, State of the Vatican City
  • [lt-LT] Lithuanian, Lithuania
  • [ru-RU] Russian, Russia

As you can see, that's only a few locales and not all that should be covered. So if you're working on localization of LibreOffice and your language uses month name cases, please contribute the locale data additions as lined out above. Best send a patch of your locale's .xml data file as attachment to the developer mailing list and I'll pick it up. If uncertain how to do that just ask and we'll help. For an example how the data looks like see i18npool/source/localedata/data/lt_LT.xml and search for GenitiveMonths. If you're interested in technical details of locale data files see i18npool/source/localedata/data/locale.dtd

Happy month casing :-)

Trackbacks

pineappledonut.org on : PingBack

Unfortunately, the contents of this trackback can not be displayed.

Comments

Display comments as Linear | Threaded

No comments

Add Comment

Enclosing asterisks marks text as bold (*word*), underscore are made via _word_.
E-Mail addresses will not be displayed and will only be used for E-Mail notifications.

To prevent automated Bots from commentspamming, please enter the string you see in the image below in the appropriate input box. Your comment will only be submitted if the strings match. Please ensure that your browser supports and accepts cookies, or your comment cannot be verified correctly.
CAPTCHA

You can use [geshi lang=lang_name [,ln={y|n}]][/geshi] tags to embed source code snippets.
Form options