[ANNOUNCE] Locale data date acceptance patterns, localizers HEADS UP please :)

Hi,

In order to get rid of the annoying "accept every input as date that
might resemble some date in almost any locale" behavior I recently
implemented locale dependent date acceptance patterns that need to be
matched for date input, for full details see
http://erack.org/blog/archives/8-LibreOffice-date-acceptance-patterns.html

If in your locale input of incomplete/abbreviated dates shall be
allowed, this will need a <DateAcceptancePattern> element be added to
locale data, for example in en-US it's "M/D" and in de-DE it's "D.M."
(both already in).

Just mail me the pattern(s) for your locale, I'll add it then.

Thanks
  Eike

Hi Eike,

for pt_PT You can put D/M and D-M. But I do have one question and one
observation.

Question - Does year gets added automatically?

Observation - If I write 01-01 the result will be 01-01-Year but if I
write 1-1 the result should also be 01-01-Year.

Regards

Eike,

for Slovenian please also add "M.D." (without year and spaces) and "M.
D." (without year) as well to the acceptance patterns.

Thanks,
m.

Eike Rathke wrote:

If in your locale input of incomplete/abbreviated dates shall be
allowed, this will need a<DateAcceptancePattern> element be added to
locale data, for example in en-US it's "M/D" and in de-DE it's "D.M."

I'd say that Italian (it) uses "D/M"; e.g., today's date would be commonly written as 12/1 in Italian.

Regards,
   Andrea.

Andrea
I'd say also M.D (M.D.Y) for Italian

Ciao

Sorry

D.M. (D.M.Y)

Hi Sérgio,

for pt_PT You can put D/M and D-M.

Sure about D/M ? pt_PT locale data does not define any date format using
the '/' separator.

But I do have one question and one
observation.

Question - Does year gets added automatically?

Yes, the current year is used to complete the date.

Observation - If I write 01-01 the result will be 01-01-Year but if I
write 1-1 the result should also be 01-01-Year.

That only depends on the default medium format for date, which is
DD-MM-AA for pt_PT, so yes, it's 01-01-Year.

  Eike

Hi Sérgio,

> for pt_PT You can put D/M and D-M.

Sure about D/M ? pt_PT locale data does not define any date format using
the '/' separator.

You are correct. This should only be D-M

That only depends on the default medium format for date, which is

DD-MM-AA for pt_PT, so yes, it's 01-01-Year.

AA means 2 digit year correct?

Default format should be DD-MM-AAAA. Can You change it?

Regards

Hi

pt-BR uses a lot D/M

Thanks

Olivier

Hi Sérgio,

for pt_PT You can put D/M and D-M.

Sure about D/M ? pt_PT locale data does not define any date format using
the '/' separator.

You are correct. This should only be D-M

That only depends on the default medium format for date, which is

DD-MM-AA for pt_PT, so yes, it's 01-01-Year.

AA means 2 digit year correct?

Default format should be DD-MM-AAAA. Can You change it?

Regards

- --
Olivier Hallot
Founder, Board of Directors Member - The Document Foundation
LibreOffice translation leader for Brazilian Portuguese
+55-21-8822-8812

Hi Valter,

Sorry

D.M. (D.M.Y)

> I'd say also M.D (M.D.Y) for Italian

it-IT doesn't use '.' as date separator.

  Eike

Hi Martin,

for Slovenian please also add "M.D." (without year and spaces) and "M.
D." (without year) as well to the acceptance patterns.

In master
http://cgit.freedesktop.org/libreoffice/core/commit/?id=0861854fe7a687d98abb9dacc4b6199954283fa3

Thanks
  Eike

Hi Sérgio,

You are correct. This should only be D-M

In master
http://cgit.freedesktop.org/libreoffice/core/commit/?id=c5fddb08424c54300b26fc3af19acbbfe84f9fd2

That only depends on the default medium format for date, which is
> DD-MM-AA for pt_PT, so yes, it's 01-01-Year.
>
AA means 2 digit year correct?

Yes, pt is one of the languages that have the (unfortunately) legacy
localized format code keys.

Default format should be DD-MM-AAAA. Can You change it?

Done
http://cgit.freedesktop.org/libreoffice/core/commit/?id=12eb7da661635a64272e32204f246d0a5c299ccd

Thanks
  Eike

Hi Olivier,

pt-BR uses a lot D/M

In master
http://cgit.freedesktop.org/libreoffice/core/commit/?id=74fea31257372746caf81148a1be9cff1fe36728

Thanks
  Eike

Hi Andrea,

I'd say that Italian (it) uses "D/M"; e.g., today's date would be
commonly written as 12/1 in Italian.

In master
http://cgit.freedesktop.org/libreoffice/core/commit/?id=90a94c55077cff0f0077ff46618365970c07223f

Thanks
  Eike

For nl, if needed both nl_NL and nl_BE there are two patterns:

D/M and D-M

> Hi,
> > In order to get rid of the annoying "accept every input as date that
> might resemble some date in almost any locale" behavior I recently
> implemented locale dependent date acceptance patterns that need to be
> matched for date input, for full details see
> http://erack.org/blog/archives/8-LibreOffice-date-acceptance-patterns.html
> > If in your locale input of incomplete/abbreviated dates shall be
> allowed, this will need a<DateAcceptancePattern> element be added to
> locale data, for example in en-US it's "M/D" and in de-DE it's "D.M."
> (both already in).
> > Just mail me the pattern(s) for your locale, I'll add it then.
> > Thanks
> Eike

For gd, the patterns are D.M, D/M and D-M (technically gd-GB but I think right now we've only got gd and aren't separating gd-GB and gd-CA)

Thanks to the Anglo-American Bable, no-one is really sure about the separators any more. But thanks for sorting this out!

Michael

Hi,

please add M-D pattern for Lithuanian (lt). This should be converted into
two-digit numbers and result in YYYY-MM-DD. Thanks.

Modestas

Hi Eike,

thank you for pointing to the existence of these xml files.

I found several incorrect items in sk_SK.xml. When corrected, may I send
it to you, too?
Is it somehow possible to test such file before sending it?

Regarding Acceptance patterns. Currently, we have in Slovak:
"11." converts o 11.02.12
"11.2" converts to 11.02.12
Which is OK, I just would prefer 11.02.2012

"11-2" also converts to 11.02.12, but I would prefer 2012-01-11
Would that be possible? Both forms (with . and -) are OK according to
Slovak standard, so it makes sense to have both these possibilities.
In fact, no format is defined with the |<DateAcceptancePattern> |tag.
Which one is used then? The default one?

In fact, can we have different default format for Cand and for Writer?
This makes sense for me - in Calc I find 11.02.2012 more appropriate,
but in Writer
"11. február 2012" should be prefered.

And the last one: In "11. február 2012", "február" is in the nominative
case. However we should use genitive: "februára". Is it possible to
specify that?
Currently, the misuse the Month tag
<Month>
          <MonthID>feb</MonthID>
          <DefaultAbbrvName>február</DefaultAbbrvName>
          <DefaultFullName>februára</DefaultFullName>
</Month>
but it leads often to nonsense.

Thanks in advance,
Milos

Dňa 12.01.2012 14:43, Eike Rathke wrote / napísal(a):

Hi Eike,

I think for fr_FR we need "D/M".
Asked for other FR variants on discuss@fr ML.

Best regards.
JBF

Hi,

If in your locale input of incomplete/abbreviated dates shall be
allowed, this will need a <DateAcceptancePattern> element be added to
locale data, for example in en-US it's "M/D" and in de-DE it's "D.M."
(both already in).

Just mail me the pattern(s) for your locale, I'll add it then.

I think for ru_RU we need "D/M/" and "D.M.".