Re: Date format (was: How many people need locales?)

2001-09-05 Thread Martijn van Oosterhout
On Wed, Sep 05, 2001 at 12:23:34PM +0100, Nick Phillips wrote:
> On Wed, Sep 05, 2001 at 12:53:37PM +0200, Petr Cech wrote:
> > On Tue, Sep 04, 2001 at 09:17:12PM +1000 , Martijn van Oosterhout wrote:
> > > Does that mean it should always take a certain format irrespective of the
> > > locale? If so, which format?
> > 
> > or number format. ie. in Czech decimal separator is `,' comma and in C it's
> > `.' dot. OK, now restart gnumeric in other locale and you cannot load the
> > file :((
> 
> Which implies that it needs to know the locale used by the file. This
> means that you either need to:
> 
> 1) always use the same locale, or
> 2) tell it which local is used by the file at load time, either manually or
>by the use of metadata in/around the file.

This could be tricky if the decimal point is the same as the seperator?

3,4,5,6  <- How many fields/numbers in that line?

That's why I prefer tab separated files...
-- 
Martijn van Oosterhout 
http://svana.org/kleptog/
> Magnetism, electricity and motion are like a three-for-two special offer:
> if you have two of them, the third one comes free.




Re: Date format (was: How many people need locales?)

2001-09-05 Thread jcdubacq
On Wed, 5 Sep 2001, Petr Cech wrote:

> On Tue, Sep 04, 2001 at 09:17:12PM +1000 , Martijn van Oosterhout wrote:
> > Does that mean it should always take a certain format irrespective of the
> > locale? If so, which format?
> 
> or number format. ie. in Czech decimal separator is `,' comma and in C it's
> `.' dot. OK, now restart gnumeric in other locale and you cannot load the
> file :((

In the save file, the locale should obviously be C. However, the display
and input of data should be according to the current locale.

-- 
Jean-Christophe Dubacq -- ATER en informatique à la faculté d'Orsay.
Tel: 01 69 15 76 43 / 06 64 86 10 56 --- Email: [EMAIL PROTECTED]





Re: Date format (was: How many people need locales?)

2001-09-05 Thread Nick Phillips
On Wed, Sep 05, 2001 at 12:53:37PM +0200, Petr Cech wrote:
> On Tue, Sep 04, 2001 at 09:17:12PM +1000 , Martijn van Oosterhout wrote:
> > Does that mean it should always take a certain format irrespective of the
> > locale? If so, which format?
> 
> or number format. ie. in Czech decimal separator is `,' comma and in C it's
> `.' dot. OK, now restart gnumeric in other locale and you cannot load the
> file :((

Which implies that it needs to know the locale used by the file. This
means that you either need to:

1) always use the same locale, or
2) tell it which local is used by the file at load time, either manually or
   by the use of metadata in/around the file.

-- 
Nick Phillips -- [EMAIL PROTECTED]
Think twice before speaking, but don't say "think think click click".




Re: Date format (was: How many people need locales?)

2001-09-05 Thread Petr Cech
On Tue, Sep 04, 2001 at 09:17:12PM +1000 , Martijn van Oosterhout wrote:
> Does that mean it should always take a certain format irrespective of the
> locale? If so, which format?

or number format. ie. in Czech decimal separator is `,' comma and in C it's
`.' dot. OK, now restart gnumeric in other locale and you cannot load the
file :((
Petr Cech
-- 
Debian GNU/Linux maintainer - www.debian.{org,cz}
   [EMAIL PROTECTED]

<_Anarchy_> telsa: rommable debian will be potato chips




Re: Date format (was: How many people need locales?)

2001-09-04 Thread Brian May
> "Radovan" == Radovan Garabik <[EMAIL PROTECTED]> writes:

Radovan> On Tue, Sep 04, 2001 at 09:17:12PM +1000, Martijn van
Radovan> Oosterhout wrote:
>> On Tue, Sep 04, 2001 at 08:56:54AM +0200, Radovan Garabik
>> wrote:

>> > > > > GNUmeric doesn't display the date in this format (it is
>> up to the user > > to pick what format is used), BUT it does
>> require entering dates in > > MM/DD/ format.
>> > > 
>> > > - unless of course you have changed the locale...
>> > 
>> > I would file a bug against gnumeric in this case.  > This is
>> broken behaviour. Does in behave the same > when you import
>> data from text file? Then it > is even more broken.

Yes, it does. This was what started this investigation in the first
place: why doesn't gnumeric import dates as dates, not as strings.
Eventually we found this was the problem.

Radovan> It should reject commonly used ambiguous formats (such as
Radovan> NN/NN/NN, NN/NN/), or at least warn if something like
Radovan> this is entered.  This should ideally be configurable,
Radovan> but rejecting should be the default (and independent on
Radovan> locale).

I agree with you here. Something in the form of NN/NN/ that cannot
be parsed as a date should not get interpreted as a string.

If the user really does want a string (seems unlikely), he/she can
quote the value.

The error/warning message should indicate that the user can change the
format by changing the locale.
-- 
Brian May <[EMAIL PROTECTED]>




Re: Date format (was: How many people need locales?)

2001-09-04 Thread Radovan Garabik
On Tue, Sep 04, 2001 at 09:17:12PM +1000, Martijn van Oosterhout wrote:
> On Tue, Sep 04, 2001 at 08:56:54AM +0200, Radovan Garabik wrote:

> > > 
> > > GNUmeric doesn't display the date in this format (it is up to the user
> > > to pick what format is used), BUT it does require entering dates in
> > > MM/DD/ format.
> > > 
> > > - unless of course you have changed the locale...
> > 
> > I would file a bug against gnumeric in this case.
> > This is broken behaviour. Does in behave the same
> > when you import data from text file? Then it
> > is even more broken.
> 
> Does that mean it should always take a certain format irrespective of the
> locale? If so, which format?
> 

It should reject commonly used ambiguous formats (such as NN/NN/NN,
NN/NN/), or at least warn if something like this is entered.
This should ideally be configurable, but rejecting should be 
the default (and independent on locale).

-- 
 ---
| Radovan Garabik http://melkor.dnp.fmph.uniba.sk/~garabik/ |
| __..--^^^--..__garabik @ melkor.dnp.fmph.uniba.sk |
 ---
Antivirus alert: file .signature infected by signature virus.
Hi! I'm a signature virus! Copy me into your signature file to help me spread!




Re: Date format (was: How many people need locales?)

2001-09-04 Thread Martijn van Oosterhout
On Tue, Sep 04, 2001 at 08:56:54AM +0200, Radovan Garabik wrote:
> On Tue, Sep 04, 2001 at 11:20:33AM +1000, Brian May wrote:
> > > "Radovan" == Radovan Garabik <[EMAIL PROTECTED]> writes:
> 
> > Radovan> format is important but whoever designes his software to
> > Radovan> display 8/1/63 should be shot, locale or no locale.
> > 
> > GNUmeric doesn't display the date in this format (it is up to the user
> > to pick what format is used), BUT it does require entering dates in
> > MM/DD/ format.
> > 
> > - unless of course you have changed the locale...
> 
> I would file a bug against gnumeric in this case.
> This is broken behaviour. Does in behave the same
> when you import data from text file? Then it
> is even more broken.

Does that mean it should always take a certain format irrespective of the
locale? If so, which format?

As far as I'm concerned, as long as it accepts -mm-dd I'm happy.

-- 
Martijn van Oosterhout 
http://svana.org/kleptog/
> Magnetism, electricity and motion are like a three-for-two special offer:
> if you have two of them, the third one comes free.




Date format (was: How many people need locales?)

2001-09-04 Thread Radovan Garabik
On Tue, Sep 04, 2001 at 11:20:33AM +1000, Brian May wrote:
> > "Radovan" == Radovan Garabik <[EMAIL PROTECTED]> writes:

> Radovan> format is important but whoever designes his software to
> Radovan> display 8/1/63 should be shot, locale or no locale.
> 
> GNUmeric doesn't display the date in this format (it is up to the user
> to pick what format is used), BUT it does require entering dates in
> MM/DD/ format.
> 
> - unless of course you have changed the locale...

I would file a bug against gnumeric in this case.
This is broken behaviour. Does in behave the same
when you import data from text file? Then it
is even more broken.

-- 
 ---
| Radovan Garabik http://melkor.dnp.fmph.uniba.sk/~garabik/ |
| __..--^^^--..__garabik @ melkor.dnp.fmph.uniba.sk |
 ---
Antivirus alert: file .signature infected by signature virus.
Hi! I'm a signature virus! Copy me into your signature file to help me spread!