Swedish dates [was: Re: test binaries for Beta 5]

Joakim Bygdell j.bygdell at gmail.com
Wed Aug 6 12:44:21 PDT 2014


On Wed, Aug 6, 2014 at 9:29 PM, Dirk Hohndel <dirk at hohndel.org> wrote:

> On Wed, Aug 06, 2014 at 04:24:56PM -0300, Thiago Macieira wrote:
> > On Wednesday 06 August 2014 10:36:26 Dirk Hohndel wrote:
> > > > “Sön 6 jul, 2014” will work in all cases.
> > >
> > > I don't think I can easily tell Qt not to use ordinals here. Even
> though
> > > the wiki above seems to say that that's preferred for dates.
> > >
> > > Thiago?
> >
> > Looks like the QLocale data is faulty somehow.
> >
> > I asked the bot on IRC and it replied:
> >
> > 14:40 <+thiago> qout: { QLocale l("sv-SE"); qDebug() <<
> l.toString(QDate(2014,
> > 8, 1), QLocale::LongFormat); }
> > 14:40 <+qout> "fredagen den 1:e augusti 2014"
> >
> > I know we process the CLDR data from unicode.org, but a rule like "use
> this on
> > day 1 and use that on other days" is definitely not part of Qt. Most
> likely, we
> > failed to parse and will need to add an exception.
>
> The format appears to try to build all ordinals with ':e' which I have now
> learned is wrong :-/
>
> /D
>
A correct parsing rule is a bit tricky as it must include some exeptions.
Dates ending on 1 or 2 should have ":a" after except if the second to last
is 1 then they should have ":e" as should all dates ending on any number
except 1 or 2.



-- 
/Jocke
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.hohndel.org/pipermail/subsurface/attachments/20140806/1a252974/attachment.html>


More information about the subsurface mailing list