[TYPO3-core] RFC: Bug 4666: Date formatting should use Typo3 default settings and be configurable

Ernesto Baschny [cron IT] ernst at cron-it.de
Tue Jan 30 11:07:40 CET 2007


Dmitry Dulepov wrote: on 30.01.2007 10:41:

> Martin Kutschker wrote:
>> Anyway, wherever now date() is used, I agree that we should use the
>> conf. var. But for the indexed search I think we should not use
>> date(), but strftime().
> 
> It is still bad sometimes. I have no idea how good it looks with German
> day names but it looks awful with Russian. Day names are spelled
> correctly if used on their own but wrong if used with day number. For
> example, "%d %B %Y" becomes "30 Январь 2007" while must be "30 января
> 2007 г." (case+spelling change+appended text!), so strftime() is useless
> and everyone writes custom function is its Cyrillic application to do it
> properly.

What does these output in Russian:

%x - preferred date representation for the current locale without the time
%X - preferred time representation for the current locale without the date
%c - preferred date and time representation for the current locale

I thought those were made exactly for that purpose, which is to output
the date in a meaninful way, even in russian.

Ok, I just checked and they output just numbers. "%c" outputs strings,
but is not very good looking.

So I tend to agree that we need our "own" date-time formatting api which
should have the "custom functions" for cyrillic and every other
intelligence there might be already for date outputting. Isn't there a
library for that already somewhere? Maybe as an "extension" to the
strftime functions, so that we can use that is already there, but
extended to our needs (like for outputting "fully qualified" dates in
every language).

Cheers,
Ernesto


More information about the TYPO3-team-core mailing list