Issue 91170 - Use strftime to populate field time/date list
Summary: Use strftime to populate field time/date list
Status: CONFIRMED
Alias: None
Product: Internationalization
Classification: Code
Component: code (show other issues)
Version: current
Hardware: All All
: P3 Trivial (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL: http://au3.php.net/strftime
Keywords:
Depends on:
Blocks:
 
Reported: 2008-06-28 13:40 UTC by clytie
Modified: 2017-05-20 11:33 UTC (History)
2 users (show)

See Also:
Issue Type: ENHANCEMENT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description clytie 2008-06-28 13:40:25 UTC
Currently, each native-language community has to localize manually the list of time/date formats that 
appear when you double-click on a time or date field.

However, all these possible formats already exist, in strftime. Why not use strftime to pull those 
time/date formats from the locale?

All the data is already there on the user's machine. We just plugin to it.

For example:

%c - local date & time\n
%x - local date\n
%X - local time\n

but there are plenty of others.
Comment 1 ivo.hinkelmann 2008-06-30 12:10:01 UTC
Hi clytie,

can you please point me to the code place where you modify the time/date filed?
Comment 2 clytie 2008-06-30 14:26:49 UTC
Do you mean in the OpenOffice.org code? I'm afraid I don't know. These field formats show up in the 
application when you double-click on a field or cell formatted to display time or date. (Under Format > 
Cell(s), the date and time formats appear to be localized, but they weren't when I double-clicked on a 
test spreadsheet when testing a bug the other day.)

I only know that other projects use strftime to populate this kind of data, to save having to specify it for 
each language. srtftime is installed by default on all Linux/UNIX systems (so that includes Mac OSX). If it 
isn't installed on Windows (though it well may be), it could be included with the application code.
Comment 3 ivo.hinkelmann 2008-06-30 14:31:50 UTC
NN, can you give me a hint what this issue is about. Is it L10N related or a
code bug?!?
Comment 4 niklas.nebel 2008-06-30 14:56:26 UTC
I suppose it's about the date- and time-related FormatElement entries in
LocaleData, in i18npool/source/localedata/data. The format list in Writer's
field dialog uses the number formatter, which is filled from these entries.
Comment 5 ooo 2008-07-11 12:08:23 UTC
Using strftime() would not be a good idea.
- Only a very limited subset of all needed date/time formats is covered
  by strftime(), if any.
- A locale has to be installed in the system to be able to use it. Most
  systems have only 2 or 3 locales installed. Using different locale
  dependent formats in a document would not be possible.
- Locale definitions may differ between systems.
- Not all locales OOo knows are available on all systems.

I suggest to close this issue as WONTFIX.
Comment 6 Marcus 2017-05-20 11:33:46 UTC
Reset assigne to the default "issues@openoffice.apache.org".