Created on 2006-02-28.11:41:21 by tommy, last changed 2020-07-30.16:36:18 by bfrk.
msg513 (view) |
Author: tommy |
Date: 2006-02-28.11:41:18 |
|
This is a new issue for part 2 of issue31 (ISO-8801 dates)
|
msg704 (view) |
Author: kowey |
Date: 2006-06-11.05:10:48 |
|
Some notes which may be useful for both sides of the debate.
I assume we are talking about the format with which we _output_ dates, for
example in the darcs send summary of patches. Looking at the code
(PatchInfo.friendly_d), I get the impression that we were intending to print out
localised dates, but due to an error in the haskell libs (?) we always get
American ones.
The reason I point this out is to suggest that maybe the current behaviour of
printing out US dates is unintentional, in that maybe if darcs printed out
whatever dates fit into your local convention, there would be less of a cry for
iso8601 dates.
why we get US dates instead of local ones
------------------------------------------
At least, that's what System.Time.calendarTimeToString promises us, but no
matter how you set the locale, you systematically get American dates. Why is
this? I believe that it is either a bug or just misleading API documentation in
the Haskell libs. The function calenderTimeToString seems to assume that
defaultTimeLocale gives us the local locale, for example, fr_FR, whereas
defaultTimeLocale is hard coded with some English strings. The problem seems to
be some subset of the following errors
1) calendarTimeToString documentation - should not claim to format thingns using
local conventions?
2) defaultTimeLocale documentation - should not claim to use local conventions
3) calendarTimeToString implementation - should not use defaultTimeLocale
4) defaultTimeLocale implementation - should not be hard coded
I suppose a good next action to undertake here might be to contact some haskell
people and see what they think. I'm not sure how one would fix this. I imagine
you'd need something in IO which gets you the local conventions, and then be
willing to make an unsafe call to it at some point.
where do we go from here?
-------------------------
It seems we have 3 options, which of course, may be mixed and matched
1. status quo - keep the US dates; note that if the haskell lib folk agree that
the above is a bug, then we may have to change our code to keep our behaviour
2. fix things and get locale-driven dates
3. systematically output iso8601 dates
Note that #2 might not be so good for the darcs send summaries, especially if
you're doing the whole darcs-send-to-mailing-list thing. English speakers might
be confused by French dates, for example. Then again, who really looks at the
dates in these things anyway?
Also, for #3, I do find that a string of numbers is harder for a human being to
parse than a nicely spaced out string with mixed numbers and letters, that is that
2006-05-22 14:26:55+0200
is a bit more difficult for me than
Mon May 22 14:26:55 CEST 2006
If we were to go to number #3 in the name of universal unambiguity, I'd suggest
we make a small concession to human-friendliness by prefixing the date with
(xxx) where xxx is the day of the week, preferably localised. So what we'd get
is something like
(Mon) 2006-05-22 14:26:55+0200
Computers then would know to throw away the first 5 characters, and human beings
would be able to say, "oh ok, Monday, two days ago"
|
msg706 (view) |
Author: tuomov |
Date: 2006-06-15.08:51:00 |
|
Regarding defaultTimeLocale, I think that either it is supposed to return the
POSIX/anglophone time format, or it has incorrect type. For the locale's time
format depends on setlocale() (which doesn't seem to exist in the GHC/Haskell
standard libraries), and thus we should have defaultTimeLocale :: IO TimeLocale.
As for readability of formats, I find the ISO-8601 style format much easier to
read than the anglophone format with illogical (month day ... year) ordering and
non-numeric month, my native format being 22.5.2006 14:26:55+0200, which is like
ISO-8601 but with the day number in reversed order.
|
msg3688 (view) |
Author: zooko |
Date: 2008-02-28.17:10:24 |
|
kowey wrote: "Also, for #3, I do find that a string of numbers is harder for a
human being to parse than a nicely spaced out string with mixed numbers and
letters, that is that
2006-05-22 14:26:55+0200
is a bit more difficult for me than
Mon May 22 14:26:55 CEST 2006"
This is partially a matter of practice. People who grew up in different
cultures have different experiences of this. Personally, I have been using ISO
8601 for so many years that I find the ISO 8601'ish string above easier to read
than the American string.
|
msg3689 (view) |
Author: zooko |
Date: 2008-02-28.17:11:42 |
|
"If we were to go to number #3 in the name of universal unambiguity, I'd suggest
we make a small concession to human-friendliness by prefixing the date with
(xxx) where xxx is the day of the week, preferably localised. So what we'd get
is something like
(Mon) 2006-05-22 14:26:55+0200"
This format looks fine to me.
I think that we should use a format like this one as the default if there is not
a local-culture-specific format that the user prefers.
|
msg3690 (view) |
Author: zooko |
Date: 2008-02-28.17:13:04 |
|
Oh, except that the day-of-the-week thing is culture-specific. If we put it
after instead of before then it will be easier for computers to ignore it. (For
example, what about cultures that use two or four chars for weekday names
instead of three?)
How about this:
2006-05-22 14:26:55+0200 (Mon)
|
msg3693 (view) |
Author: kowey |
Date: 2008-02-28.17:44:48 |
|
> 2006-05-22 14:26:55+0200 (Mon)
Alternatively, if a simple day-of-week doesn't tell the human very
much, we could go for a short text date
2006-05-22 14:26:55+0200 (3 Jan)
Or some combination. And since we're already being neutral by giving
an ISO date, we could do this in English for ease of implementation
:-P
|
msg5762 (view) |
Author: zooko |
Date: 2008-08-28.13:22:21 |
|
So I for one would be happy with this format becoming the default one:
2006-05-22 14:26:55+0200 (3 Jan)
The first part is ISO-8601 (except with space instead of 'T' between the date
and the time) and the format of the last part is up to kowey or other people who
don't read ISO-8601 natively. :-)
|
msg5763 (view) |
Author: kowey |
Date: 2008-08-28.13:30:28 |
|
I don't hear any strong objections to this (outputting ISO 8601 dates, perhaps
with some trailing junk for easy reading). Please note that this issue is only
about what dates _outputs_ to the user, for example, in darcs changes, or in
darcs send. Nothing else (patch formats, XML) changes.
|
msg5765 (view) |
Author: droundy |
Date: 2008-08-28.13:35:57 |
|
On Thu, Aug 28, 2008 at 01:30:36PM -0000, Eric Kow wrote:
> I don't hear any strong objections to this (outputting ISO 8601 dates, perhaps
> with some trailing junk for easy reading). Please note that this issue is only
> about what dates _outputs_ to the user, for example, in darcs changes, or in
> darcs send. Nothing else (patch formats, XML) changes.
I would say that it makes sense to me to make this configurable, if
we're going to change darcs' behavior. We never find out about the
unwashed masses who like darcs' current behavior until we change it.
David
|
msg5766 (view) |
Author: kowey |
Date: 2008-08-28.14:29:45 |
|
> I would say that it makes sense to me to make this configurable, if
> we're going to change darcs' behavior. We never find out about the
> unwashed masses who like darcs' current behavior until we change it.
Ok, I would suggest using the ISO format by default, and allowing the
DARCS_DATE_FORMAT environment variable using the same format
understood by the Unix date program to override it (with documentation
showing the format you need to set it to to get the old format)
|
msg22305 (view) |
Author: bfrk |
Date: 2020-07-30.16:36:16 |
|
I think this has been fixed a long time ago.
|
|
Date |
User |
Action |
Args |
2006-02-28 11:41:21 | tommy | create | |
2006-06-11 05:10:50 | kowey | set | status: unread -> unknown nosy:
+ kowey messages:
+ msg704 |
2006-06-15 08:40:23 | tuomov12345 | set | nosy:
+ tuomov1 |
2006-06-15 08:51:06 | tuomov12345 | set | nosy:
+ tuomov12345 messages:
+ msg706 |
2006-06-15 08:53:33 | tuomov12345 | set | nosy:
- tuomov12345 |
2008-02-09 15:47:40 | markstos | set | status: unknown -> deferred nosy:
+ beschmi title: convert to ISO-8601 as default format -> wish: convert to ISO-8601 as default date format |
2008-02-28 17:10:26 | zooko | set | nosy:
+ zooko messages:
+ msg3688 |
2008-02-28 17:11:44 | zooko | set | nosy:
droundy, tommy, beschmi, kowey, zooko, tuomov1 messages:
+ msg3689 |
2008-02-28 17:13:06 | zooko | set | nosy:
droundy, tommy, beschmi, kowey, zooko, tuomov1 messages:
+ msg3690 |
2008-02-28 17:44:50 | kowey | set | nosy:
droundy, tommy, beschmi, kowey, zooko, tuomov1 messages:
+ msg3693 |
2008-08-28 13:22:23 | zooko | set | nosy:
+ dagit messages:
+ msg5762 |
2008-08-28 13:30:36 | kowey | set | status: deferred -> needs-reproduction nosy:
+ jaredj topic:
+ ProbablyEasy, UI messages:
+ msg5763 |
2008-08-28 13:35:59 | droundy | set | nosy:
droundy, tommy, beschmi, kowey, zooko, dagit, tuomov1, jaredj messages:
+ msg5765 |
2008-08-28 14:29:48 | kowey | set | nosy:
droundy, tommy, beschmi, kowey, zooko, dagit, tuomov1, jaredj messages:
+ msg5766 |
2009-03-30 13:02:59 | kowey | link | issue1410 superseder |
2009-08-06 17:33:16 | admin | set | nosy:
+ markstos, jast, Serware, dmitry.kurochkin, darcs-devel, mornfall, simon, thorkilnaur, - droundy, tuomov1, jaredj |
2009-08-06 20:49:15 | admin | set | nosy:
- beschmi |
2009-08-10 21:44:16 | admin | set | nosy:
+ tuomov1, jaredj, - markstos, darcs-devel, jast, Serware, mornfall |
2009-08-10 23:53:28 | admin | set | nosy:
- dagit |
2009-08-25 17:48:00 | admin | set | nosy:
+ darcs-devel, - simon |
2009-08-27 14:16:22 | admin | set | nosy:
tommy, kowey, darcs-devel, zooko, tuomov1, thorkilnaur, jaredj, dmitry.kurochkin |
2009-09-02 19:56:16 | kowey | set | priority: wishlist -> feature status: needs-reproduction -> needs-implementation nosy:
tommy, kowey, darcs-devel, zooko, tuomov1, thorkilnaur, jaredj, dmitry.kurochkin |
2009-10-23 22:47:23 | admin | set | nosy:
+ tuomov12345, - tuomov1 |
2009-10-24 00:12:03 | admin | set | nosy:
+ tuomov1, - tuomov12345 |
2009-10-24 00:41:02 | admin | set | nosy:
+ tuomov, - tuomov1 |
2011-01-05 17:23:34 | kowey | link | issue2014 superseder |
2012-01-13 21:43:53 | kowey | link | issue2127 superseder |
2020-07-30 16:36:18 | bfrk | set | status: needs-implementation -> resolved messages:
+ msg22305 |
|