Override the Document Locale Date Format

Discuss the word processor

Override the Document Locale Date Format

Postby Llelan D. » Mon Jan 07, 2013 9:24 am

There are many threads about formatting Date fields, but what I want to do is to override the date format for the current locale.

In many cases with historical or international documents, the locale is fine for number and currency formats but not for the date. An author might choose from many different flavors of date format available in their locale, a format they are used to from another locale, or an international format (like UTC). There are many AOO functions and extensions that insert dates and allow the default AOO locale processing to format them. This sticks you with the locale format and not the one you want for that document. An example would by the Mendeley citation manager inserting a date into a bibliography entry. The date is always formatted as per the currently set locale for the document.

So, what I want to know is: how do I change the default date format for a specific Writer document for a given locale so that everything else is formatted by that locale but any dates given to AOO by any other code or extension is formatted by the overridden date format for that document?

Remember, this has nothing to do with manual insertion of dates or date fields, nor with any other application but Writer (not Calc!).
OpenOffice 3.4 on Windows 7
User avatar
Llelan D.
 
Posts: 10
Joined: Wed Jul 21, 2010 5:56 pm

Re: Override the Document Locale Date Format

Postby Villeroy » Mon Jan 07, 2013 9:36 am

Use the language list on the right side of the number format dialog to override the default locale.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04, OpenOffice 4.x & LibreOffice 6.x
User avatar
Villeroy
Volunteer
 
Posts: 26635
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Override the Document Locale Date Format

Postby Llelan D. » Mon Jan 07, 2013 10:20 am

:roll: The Number Format Dialog is only available for table cells and Fields - and I put in all of that lovely text specifically stating that this problem has nothing to do with Date Fields.

When an extension hands a date to AOO to be formatted and inserted into a document, it is inserted as plain text. There is no Number Format Dialog available for a span of plain text. Besides, even if such a function were available, it does not address my stated problem which is to override the document default locale date format, not manually patch inserted date formats.

An extension can not format something like a date since that depends on how the document is configured. It must allow the document software, in this case Writer, to perform the format and insertion. This means AOO has to have a way to specify the locale for that document, which it does, and any document overrides to that locale formatting, which is for what I am looking in relation to date formatting.

Unless you are cryptically referring to some other function unknown to me. In which case, could you be more specific as I do not know of any other way to get a Number Format Dialog outside of the context menu for table cells or a Date Field.
OpenOffice 3.4 on Windows 7
User avatar
Llelan D.
 
Posts: 10
Joined: Wed Jul 21, 2010 5:56 pm


Return to Writer

Who is online

Users browsing this forum: No registered users and 21 guests