On Thu, 1 Mar 2007, Graeme Geldenhuys wrote:
> Hi,
>
> On 2/28/07, Michael Van Canneyt <[EMAIL PROTECTED]> wrote:
>
> > You should not have to worry about it. You use TDateTime, and convert to
> > string as needed as the user sees fit.
> >
> > I don't agree with Graeme's solution: it's not up to the programmer
> > to decide how the date/time is shown to the user. The user has decided
> > that for us when he configured his regional/localization settings.
>
> Both you and Peter V. misunderstood my post slightly. You don't have
> to force the user to see the date/time in a certain format. Though we
> opted for it after a length discussion. Storing the date/time as a
> string in the ISO 8601 format is forced and allows you to export data
> to another application without having to try and guess the date format
> in the new application (yyyymmdd, ddmmyyyy, mmddyyyy, etc).
You don't need to guess if it's in the database native format ?
>
> Once the string date/time is read and converted it to a TDateTime,
> the GUI can displays it in the way the user specified in their
> regional settings, but as soon as it goes back to the database or some
> file, it gets converted back to the ISO string format.
>
> So bottom line, the user sees the date/time it the format they prefer.
> This is the first choice. We opted to follow the ISO
> 8601recommendation for display as well, to help remove confusion
> between various date formats in digital or hardcopy form.
To me this sounds contradictory :-)
"the user sees the date/time it the format they prefer."
"We opted to follow the ISO 8601recommendation for display as well"
Which one is it ? You can't have both :-)
>
> Imagine the following case:
> The user in USA generates a report with date/time columns as a PDF
> document. Emails that to head office in the EU somewhere where in
> changes hands a few times. Now how do we know what date format that
> report used?
>
> Is 02-06-2002 the 2nd June or is it 6th Feb? So when is the deadline
> for the multi-million dollar contract? :-) If it uses the ISO 8601
> format yyyy-mm-dd there is no confusion, hence the reason we opted for
> that format in our applications (display on screen and paper and in
> storage).
So, the user has no choice... ?
(not trying to argue here, but your statements seem contradictory
to me. But that's probably me :/)
Michael.
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives