Re: Formatting a date/time string



On 12/29/05, Abel Cheung <abelcheung gmail com> wrote:
> %c poses some usability annoyance since the file dialog will be either very
> large, or the date/time part is simply hidden under cover and users have
> to scroll horizontally before seeing it.

Agreed.


> If short string is more desired, I'd suggest showing only the time if
> modification time is within 1 day, and only showing the date if more than
> 1 day. And use ISO8601 format for date representation as well:
> "%Y-%m-%d". This avoids ambiguity. For display of time, perhaps
> the seconds part can be removed as well?

I'd say try to use %x and/or %X for dates and times. They usually
produce shorter string representations than the %c specifier.
Unfortunately, there is no standard specifier that produces a
localized time string without the seconds part... :-(

> And of course, make the string translatable is the best thing to do, since
> translators can decide if there are any better date/time representation
> for their own language.

Agreed. If you want to use both %x and %X in the time display, you
probably have to make it translateable, so that translators can
reorder the arguments if necessary.

However, this sucks for users who only want to have the display
language be something different (LC_MESSAGES), but otherwise want to
have times etc. be formatted according to their own locale, since
doing it like this and hooking up the date/time display in the
translations makes the time display be dependant on the display
language. But it is probably the best thing to do right now, until we
have something better.


Christian


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]