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

Localized output of the date command (fwd)



% LANG=da_DK \date -d 2005-01-01
lør jan  1 00:00:00 CET 2005

... er ikke specielt heldigt.  Selv hvis vi vil beholde
varianten med forkortelserne mangler der mindst tre
punktummer.  Personligt vil jeg dog foretrække at vi - når 
det nu alligevel er det lange format - skriver ugedagene og 
månederne fuldt ud:

% LANG=da_DK \date +"%A den %e. %B %Y klokken %H:%M:%S (UTC%z)" -d 2005-01-01
lørdag den  1. januar 2005 klokken 00:00:00 (UTC+0100)

Om man skal bruge tidszonekoder (%Z) eller skrive afvigelsen
fra UTC eksplicit (UTC%z) er noget man måske kan betegne som
en smagssag.

Hvad siger I andre?

Jacob
-- 
I øvrigt mener jeg at det er uhensigtsmæssigt at skrive
»pipes« om kanaler i en begynderbog om Unix.

---------- Forwarded message ----------
Date: Sun, 1 May 2005 13:45:20 +0200
From: Denis Barbier <barbier@linuxfr.org>
To: debian-i18n@lists.debian.org
Subject: Localized output of the date command
Resent-Date: Sun,  1 May 2005 06:49:35 -0500 (CDT)
Resent-From: debian-i18n@lists.debian.org

Hi,

when discussing issues about Greek locale, Konstantinos Margaritis
and I realized that date_fmt field had been added in glibc to other
POSIX fields in order to customize output of the 'date' command.
This means that with the latest belocs-locales-data upload, Greek
and French speaking people should no more be surprised by 'date'
output.

If your language also has a wrong output, please file bugreports
against belocs-locales-data (you can of course file a similar bug
report against the locales package).  But contact your l10n list
first to make sure that there is a consensus within your community
on the best display output.

In order to determine this field, you can run date like this:
  $ date +"%a %b %e %H:%M:%S %Z %Y"
to test string formats.  See strftime(3) for explanations on
%-sequences.  The -d flag is also useful, e.g.
  $ date +"%a %b %e %H:%M:%S %Z %Y" -d 23:45
to see time in the afternoon, or
  $ date +"%a %b %e %H:%M:%S %Z %Y" -d 2005-03-04
to check output when day of the month has only one digit.

Denis


-- 
To UNSUBSCRIBE, email to debian-i18n-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org



Reply to: