Re: [Development] Two-digit dates: what century should we use ?

2019-11-08 Thread André Somers
On 08-11-19 11:15, Edward Welbourne wrote: André Somers (6 November 2019 17:20) wrote I came to the conclusion that the sane behavior for interpreting dates depends on the semantics of what the date means. For instance, a birth date will always be a date in the past, On 07-11-19 11:47, Edward

Re: [Development] Two-digit dates: what century should we use ?

2019-11-08 Thread Edward Welbourne
André Somers (6 November 2019 17:20) wrote >>> I came to the conclusion that the sane behavior for interpreting >>> dates depends on the semantics of what the date means. For instance, >>> a birth date will always be a date in the past, On 07-11-19 11:47, Edward Welbourne wrote: >> ... except

Re: [Development] Two-digit dates: what century should we use ?

2019-11-08 Thread André Somers
On 07-11-19 11:47, Edward Welbourne wrote: André Somers (6 November 2019 17:20) wrote I came to the conclusion that the sane behavior for interpreting dates depends on the semantics of what the date means. For instance, a birth date will always be a date in the past, ... except when it's the

Re: [Development] Two-digit dates: what century should we use ?

2019-11-07 Thread Edward Welbourne
On 6. Nov 2019, at 13:38, Edward Welbourne wrote: >>> Simplest would be to have two optional arguments, startYear and >>> span; in 5.15, startYear must be supplied (to distinguish this >>> overload from the old method) but span can be optional, defaulting >>> to 100 (also used if span < 0 or span

Re: [Development] Two-digit dates: what century should we use ?

2019-11-07 Thread Edward Welbourne
André Somers (6 November 2019 17:20) wrote > I came to the conclusion that the sane behavior for interpreting dates > depends on the semantics of what the date means. For instance, a birth > date will always be a date in the past, ... except when it's the best-estimate date of birth of an

Re: [Development] Two-digit dates: what century should we use ?

2019-11-07 Thread Eike Ziller
> On 6. Nov 2019, at 13:38, Edward Welbourne wrote: > > Eike Ziller (6 November 2019 09:45) >> It sounds to me like any automatically chosen base for 2-digit years >> will be wrong depending on use case. > > You (among several others) make a compelling case. > >> If you want to make it

Re: [Development] Two-digit dates: what century should we use ?

2019-11-06 Thread André Pönitz
On Wed, Nov 06, 2019 at 12:38:48PM +, Edward Welbourne wrote: > want. Sample options: > * keep 1900-1999, discourage use of ShortFormat; > * rolling window based on currentDate(), as I described earlier; > * we update startYear's default with each major release of Qt. First option seems to

Re: [Development] Two-digit dates: what century should we use ?

2019-11-06 Thread André Somers
Hi, On 05-11-19 14:44, Edward Welbourne wrote: Hi all, Prompted by [0], I'm looking at what century to use for years, when the text being read is expected to be in a "short format" that only includes two digits. * [0] https://bugreports.qt.io/browse/QTBUG-74323 tl;dr - how do folk feel about

Re: [Development] Two-digit dates: what century should we use ?

2019-11-06 Thread Eirik Aavitsland
On 11/6/19 1:38 PM, Edward Welbourne wrote: > > Anyone want to make the case for keeping 1900--1999 as default ? Yup, I'll bite, for the following reasons: 1) The downside of changing it is certain: breaking existing apps. In particular, breaking the old code dealing with old data, which is

Re: [Development] Two-digit dates: what century should we use ?

2019-11-06 Thread Edward Welbourne
Eike Ziller (6 November 2019 09:45) > It sounds to me like any automatically chosen base for 2-digit years > will be wrong depending on use case. You (among several others) make a compelling case. > If you want to make it easier for people to implement their > interpretation of 2-digit years,

Re: [Development] Two-digit dates: what century should we use ?

2019-11-06 Thread NIkolai Marchenko
> If you want to make it easier for people to implement their interpretation of 2-digit years, you could add an (optional) explicit window to the QDate::fromString API? that would actually be very appreciated On Wed, Nov 6, 2019 at 11:46 AM Eike Ziller wrote: > It sounds to me like any

Re: [Development] Two-digit dates: what century should we use ?

2019-11-06 Thread Eike Ziller
It sounds to me like any automatically chosen base for 2-digit years will be wrong depending on use case. For some applications, only the past is relevant. For some applications, dates N years into the future are relevant. If we choose any N for a window, that can be wrong for some application.

Re: [Development] Two-digit dates: what century should we use ?

2019-11-06 Thread Elvis Stansvik
Den tis 5 nov. 2019 15:48Kari Oikarinen skrev: > > > On 5.11.2019 15.44, Edward Welbourne wrote:> Hi all, > > > > Prompted by [0], I'm looking at what century to use for years, when the > > text being read is expected to be in a "short format" that only includes > > two digits. > > * [0]

Re: [Development] Two-digit dates: what century should we use ?

2019-11-05 Thread Kari Oikarinen
On 5.11.2019 15.44, Edward Welbourne wrote:> Hi all, > > Prompted by [0], I'm looking at what century to use for years, when the > text being read is expected to be in a "short format" that only includes > two digits. > * [0] https://bugreports.qt.io/browse/QTBUG-74323 > > tl;dr - how do

Re: [Development] Two-digit dates: what century should we use ?

2019-11-05 Thread NIkolai Marchenko
I would like to point out that every codebase that has two work with double digits is so full of assumptions about what to do with those that by changing the behaviour you will undoubtedly break stuff. I know because I am working with one (aviation traffic). It's not so much a discouragement from

[Development] Two-digit dates: what century should we use ?

2019-11-05 Thread Edward Welbourne
Hi all, Prompted by [0], I'm looking at what century to use for years, when the text being read is expected to be in a "short format" that only includes two digits. * [0] https://bugreports.qt.io/browse/QTBUG-74323 tl;dr - how do folk feel about (in Qt 6) a century-wide window, ending a decade