Skip to content

Does your LibreOffice locale need a date acceptance pattern for incomplete date input?

Update 2012-08-31T23:08+0200 : Editable Date Acceptance Patterns in LibreOffice

As explained in an earlier article a new feature will be available with LibreOffice 3.6 that limits date recognition of input to predefined locale dependent patterns to prevent erroneous detection of dates. To be able to input incomplete dates a locale needs date acceptance patterns defined in its locale data, quite a lot submissions of such patterns have already been included, but many locales do not have any pattern assigned yet. For these locales date input will only be possible as a complete date, no incomplete dates will be accepted. Maybe your locale should be enabled for incomplete date input but isn't yet? Then please submit the pattern(s), either as a comment to this blog post, or on the LibreOffice l10n mailing list if you are involved with LibO localization anyway, or simply mail me.

Locales without explicit DateAcceptancePattern elements:
(one implicit full date pattern is always generated)

ak_GH    ar_DZ    ar_EG    ar_OM    ast_ES    az_AZ    bn_IN    bs_BA    cv_RU    da_DK    de_AT    de_CH    de_LI    de_LU    dsb_DE    dz_BT    ee_GH    el_GR    en_AU    en_CA    en_GB    en_GH    en_JM    en_NA    en_ZA    eo    es_AR    es_BO    es_CL    es_CO    es_CR    es_DO    es_EC    es_GT    es_PE    eu    fa_IR    fo_FO    fr_CA    fur_IT    fy_NL    gl_ES    gsc_FR    gug_PY    ha_GH    haw_US    he_IL    hi_IN    hil_PH    hr_HR    hsb_DE    ht_HT    hu_HU    hy_AM    ia    id_ID    it_CH    jbo    ka_GE    kk_KZ    kl_GL    km_KH    ko_KR    ku_TR    ky_KG    la_VA    lb_LU    lg_UG    lif_NP    ln_CD    lo_LA    ltg_LV    lv_LV    mai_IN    mk_MK    ml_IN    mn_MN    mt_MT    my_MM    myv_RU    ne_NP    no_NO    oc_FR    om_ET    or_IN    pjt_AU    pl_PL    plt_MG    ro_RO    rue_SK    rw_RW    sc_IT    sg_CF    shs_CA    so_SO    sr_RS    sv_FI    sv_SE    sw_TZ    tg_TJ    th_TH    ti_ER    tk_TM    tpi_PG    ug_CN    uk_UA    ur_PK    uz_UZ    vi_VN    wa_BE    zh_HK    zh_MO    zh_SG   

Locales with explicit DateAcceptancePattern elements:

  • an_ES:
    • D/M
  • be_BY:
    • D/M/
    • D.M.
  • bg_BG:
    • D.M.Y г.
    • D.M.Y г.
    • D.M.Y Г.
    • D.M.Y Г.
  • br_FR:
    • D/M
  • ca_ES:
    • D/M
  • cs_CZ:
    • D.M.
    • D. M.
    • D. M. Y
    • D. M.
    • D. M. Y
  • de_DE:
    • D.M.
  • en_US:
    • M/D
  • es_ES:
    • D/M
  • et_EE:
    • D.M
    • D. M
    • D.M.
    • D. M.
  • fi_FI:
    • D.M.
  • fr_BE:
    • D/M
  • fr_CH:
    • D/M
    • D.M.
  • fr_FR:
    • D/M
  • fr_LU:
    • D/M
  • gd_GB:
    • D/M
    • D-M
  • is_IS:
    • D/M/
    • D.M.
  • it_IT:
    • D/M
  • ja_JP:
    • M-D
    • M/D
    • M/D
    • Y.M.D
    • Y/M/D
    • Y年M月D日
    • M月D日
  • kab_DZ:
    • D/M
  • lt_LT:
    • M-D
  • nl_BE:
    • D/M
  • nl_NL:
    • D-M
  • pt_AO:
    • D-M
  • pt_BR:
    • D/M
  • pt_PT:
    • D-M
  • ru_RU:
    • D.M.
    • D/M/
  • sk_SK:
    • D.M.
    • D. M.
    • D. M. Y
    • D. M.
    • D. M. Y
  • sl_SI:
    • D. M. Y
    • D.M.
    • D. M.
  • tr_TR:
    • D.M
    • D/M
    • D-M
  • zh_CN:
    • M-D
    • M/D
    • M/D
    • Y.M.D
    • Y/M/D
    • Y年M月D日
    • M月D日
  • zh_TW:
    • Y.M.D
    • M-D
    • M/D
    • Y年M月D日
    • M月D日

If some of the entries seem to be duplicates within a locale and include spaces, that's because they are defined both with normal space and with breaking space to accommodate both input variants.

Trackbacks

The Pathedral and the Kazoo on : Editable Date Acceptance Patterns in LibreOffice

Show preview
The introduction of more restrictive date acceptance patterns in LibreOffice 3.6 (see earlier blog entries here and here) generated quite some discussion whether the change was good or bad. The fact that not all locales had patterns for incomplete (only

Comments

Display comments as Linear | Threaded

Nuss on :

For sv_SE, besides the ISO way ("Y-M-D"), the most widespread style for dates is "D/M" or "D/M Y", according to the Swedish Language Council. They also claim D.M.Y is used (however, I haven't seen that style especially much).

If you need a source for this, visit http://www.spraknamnden.se/sprakladan/ShowSearch.aspx?id=id=26089;objekttyp=lan. Be careful with Google translate though, since it puts "rd" on the year in one of the examples.

erAck on :

Thanks, added 'D/M' and 'D/M Y' to sv_SE.

Nuss on :

Cool! Thanks!

Rob Wilmshurst on :

en_GB should have the same pair of additional formats as gd_GB please.

erAck on :

Done.

Al F on :

Regardless of settings in the DateAcceptancePatterns (having locale set to norwegian in 3.6.2.2), I have to input a full date to have it recognized as such - even if I set the format of the cell to "date".

From this article I gather that it's intended that way since there is currently no assigned pattern element, but please correct me if I'm wrong.

Norwegian standards are quite lax, both YYYY-MM-DD, DD/MM/YYYY, D/M YYYY and DD.MM.YYYY will be generally recognized, and so acceptable shortcuts should be D.M.Y, D.M, D/M/Y, D/M and D-M

Regards,
Alf

erAck on :

Alf, you can edit the date acceptance patterns (see http://erack.org/blog/archives/22-Editable-Date-Acceptance-Patterns-in-LibreOffice.html ) and set them to

D.M.Y;D.M;D/M/Y;D/M;D-M

Al F on :

I did, but regardless of how I edit the DateAcceptancePatterns field, I have to input full dates (D.M.Y).

So either there's a bug, or something fishy about my configuration. I believe mostly my configuration is the problem since I also cannot change Tools->Cell Content->AutoInput - it's off and doesn't accept my attempts to switch it on. I have no idea what could be wrong, though (my laptop is running Ubuntu Studio 12.10).

Anyway, thanks for answering, and for your work with free software!

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