French/English date

Hi everyone,

LibreOffice (I use version 3.4.4 under Windows 7) offers the
possibility to insert a text field that shows the current date.
Although using the German version, I can insert a French date in the
worksheets for my students. Unfortunately, there is a little mistake
that bugs me: In French, you normally use the number of the day, the
name of the month and the year. Like "28 novembre 2011". But on every
first day of a month, you have to use the ordinal number: "1er
décembre 2011". LibreOffice (as well as Word) ignores this rule. It
doesn't allow English date formats with ordinal numbers like
"1st/2nd/3rd/4th/5th of December 2011" neither.

I find this hard to believe since this is a common way to write down a
date (especially in French).

This is why I ask you. Maybe I've been to blind to see the simple answer.

Thanks,

Julius

Hi Julius,

I understand your concerns completely. It has bothered me for years but the correct long date format in English or at least English English is :-

eg:

Tuesday the 29th. of November, 2011.

Note the correct use of articles, ordinals, commas and full stops... (the things Americans call periods.)

No word processor or database application I have ever seen can format long dates correctly in English or any other language that I'm aware of and that is why I've written my own code and macros to format dates the way I was taught at school and while that was many many many years ago evolution is no excuse for inaccuracy. To format dates incorrectly seems to me to be an expedience, not an attempt at accuracy.

Whilst we have for many years had to endure commercial applications written in one particular cultural style or another I believe open source is a very good opportunity to get localisations (notice the use of "s" and not zed) correct and if people from various cultures can contribute to this we will all be winners.

Bruce Carlson

Hi Julius,

I understand your concerns completely. It has bothered me for years but the correct long date format in English or at least English English is :-

eg:

Tuesday the 29th. of November, 2011.

Add another problem, in the US the normal date order is month day, year and I do not know what the proper legalese for dates is. I suspect it is long British usage carried over from Colonial period legal documents.

Sorry, but you were mis-taught at school. What you write and what you see in written language does not always correspond exactly to what you say. Yes: the way you say that date in British English may well be "tuesday the twenty-ninth of november twenty eleven", but that doesn't mean that you have to express all of those sounds in writing. Take, for example, your "2011". If that were an account number, you would probably read and speak it as "two oh one one" (or possibly "two zero one one") or "two oh double one"; if it were a plain number, you would say "two thousand and eleven" (USians would say "two thousand eleven"); as it is a date, you say "twenty eleven". (Well, I hope you do.) You don't read "29th" as "two nine tee aitch" or even as "twenty-nine tee aitch", but as "twenty-ninth". Your telephone number may end "one oh double six", but the battle of Hastings was in "ten sixty-six": they are spoken differently but written the same. James Bond wouldn't recognise "zero zero seven".

The normal way of writing your date in British English is "Tuesday 29 November 2011", and you read this as "tuesday the twenty-ninth of november twenty eleven". But you are very welcome to format your dates exactly as you wish, of course - until you get a job where you are required to follow the accepted system.

Oh, and you don't put a full stop after "29th" in any case: in British English usage there is no full stop if the end of the original is included in the abbreviation. "Prof." has a full stop, but "Mr" and "Dr" do not; "Rev." has one but "Revd" does not. Your primary school may well have got that wrong too.

There are plenty of authorities for all this, but you need to trust proper style guides, not primary school textbooks. And there's a reason why you cannot find any product which follows your teachers' advice!

Brian Barker

Hi at all,

although I like a passionate discussion, it would be nice if we could
focus on the problem:

In French, you HAVE TO use the ordinal number for the very first day
of the month when you use the format "1er décembre 2011" (30 novembre
2011). That's mandatory. Even other Romance languages (like Italian,
Spanish and Portuguese) usally/often use it (1º dicembre 2011, 1º de
Diciembre 2010, 1º de dezembro). So, products should make this
possible.

Products like LibreOffice should even make it possible to write "30th
November 2011". I'm no expert of the English language, but according
to the Wikipedia
(http://en.wikipedia.org/wiki/Calendar_date#Expressing_dates_in_spoken_English),
that format isn't completly unusual.

Kind regards,

Julius

Hi Julius,

Julius Becker wrote (30-11-11 09:44)

In French, you HAVE TO use the ordinal number for the very first day
of the month when you use the format "1er décembre 2011" (30 novembre
2011). That's mandatory. Even other Romance languages (like Italian,
Spanish and Portuguese) usally/often use it (1º dicembre 2011, 1º de
Diciembre 2010, 1º de dezembro). So, products should make this
possible.

I know that in Calc there are much more formatting options.
Recently the possibility for possessive genitive case month names has been added.
Are possibilities in Calc better for you? If so, there might be an relatively (...) easy route to improvement.

Best regards,

Hi Cor,

I know that in Calc there are much more formatting options.
Recently the possibility for possessive genitive case month names has been
added.
Are possibilities in Calc better for you? If so, there might be an
relatively (...) easy route to improvement.

In LibreOffice 3.4.4 (which I use), the formatting options in Calc and
Writer are the same. So, unfortunately no easy improvement.

In addition to
- "D" = Day as 2
- "DD" = Day as 02
- "DDD"/"NN" = Day as Sun-Sat
- "DDDD"/"NNN" = Day as Sunday to Saturday
there should be
- "DDDDD" = Day as 2th

Since I can't program, I don't know if this is an easy or "bumpy"
route to improvement.

Kind regards,

Julius

Hi :slight_smile:
Tuesday 29 November 2011 feels very wrong to me.  There needs to be a th in super-script just after the 29.  I agree about removing superfluous punctuation though. 
Regards from
Tom :slight_smile:

One issue would be that “DDDDD” should actually = *2nd* not *2th* …

ie. it would be /highly/ localization/language dependent to try to indicate an ordinal rather than just let the number stand on it's own… if I recall it would be 2e in French, but I think I've also seen 2me … so it could be quite problematic, particularly with any large selection of regions.

Apropos of the latter, when I was in the Air Force, some 50 years ago,
I was taught that dates should be written 30 November 2011. Knowing
the military, it's unlikely to have changed. And I still write dates that
way. When I write a letter in LO, I simply _write_ the date, I don't depend
on the software to do it. If, for some reason, I need it multiple places, I
can always copy and paste it.

--doug

/snip/

I _hate_ superscript! It should be an option to turn on, not something you have to search for to turn off!

--doug

HI,
It may have been some years between Brian going to school and my school
days and also I may have had teachers who were already old fashion then too,
however at all my schools we were told that you should always try to write
sentences as if you were speaking them.
That meant you should always include the articles and punctuation marks.
It was acceptable to write some long numbers in numeric format such as the
year and financial/currency amounts.

Over time short hand expressions have become more and more acceptable due to
expedience however there are still many of us who feel that something is
missing when we read or write long date formats without the articles.
Please don't confuse long date formats with shorthand formats. they both
have their specific uses.
I agree that there should not be a full stop after the ordinal ie: st, th or
rd but in most word processors today the only way to make the ordinal jump
up to the subscript area like when using 2 for square or 3 for cube is to
add the full stop and then a space.

As much as I agree with most of Tom's comments on this subject I still like
to see the articles ("the" and "of") and the comma after the month name and
a full stop at the end but only if it is the end of the sentence.
Maybe I'm getting too close to retirement age. :slight_smile:

The original point of this thread was date formats in French and we seem to
be forgetting that it is localisation of formats in all languages and
customs that is under question.
I'd personally like to see an attempt at improving this function and it is
not only in word processors where you can free type any format you choose
but also in spread sheets and databases etc. where the system is doing the
formatting.
A greater ability to create custom formats would help, especially if the
ability to include ordinals in multiple language styles is introduced and it
would good if LO was to take an international lead in this area.
In lot of custom format functions I've seen you can add specific text by
wrapping the text in inverted commas so adding articles to custom formats is
possible.

If anyone would like it I'd happily post my c# code for long date formats
and ordinal functions that I use in database front end applications. If I
dig deep enough I'd probably find the same functions written in several
versions of basic as well.

All this is a matter of personal choice and localising for multiple customs
but isn't that a big part of what LO is all about?

Cheers all,

Bruce Carlson

From: Tom Davies [mailto:tomdavies04@yahoo.co.uk]
Sent: Thursday, 1 December 2011 12:29 AM
o: users@global.libreoffice.org
Subject: RE: [libreoffice-users] French/English date

Hi :slight_smile:
Tuesday 29 November 2011 feels very wrong to me.  There needs to be a th in

super-script just after the 29.  I agree about removing superfluous
punctuation though. Regards from Tom :slight_smile:

From: Brian Barker <b.m.barker@btinternet.com>
Subject: RE: [libreoffice-users] French/English date
To: users@global.libreoffice.org
Date: Wednesday, 30 November, 2011, 7:51

It has bothered me for years but the correct long date format in
English or at least English English is :- eg: Tuesday the 29th. of
November, 2011. Note the correct use of articles, ordinals, commas and
full stops... (the things Americans call periods.) No word processor
or database application I have ever seen can format long dates
correctly in English or any other language that I'm aware of and that
is why I've written my own code and macros to format dates the way I
was taught at school and while that was many many many years ago
evolution is no excuse for inaccuracy. To format dates incorrectly
seems to me to be an expedience, not an attempt at accuracy. Whilst we
have for many years had to endure commercial applications written in
one particular cultural style or another I believe open source is a
very good opportunity to get localisations (notice the use of "s" and
not zed) correct and if people from various cultures can contribute to
this we

will all be winners.

Sorry, but you were mis-taught at school.  What you write and what you see
in written language does not always correspond exactly to what you say. 
Yes: the way you say that date in British English may well be "tuesday the
twenty-ninth of november twenty eleven", but that doesn't mean that you have
to express all of those sounds in writing.  Take, for example, your "2011". 
If that were an account number, you would probably read and speak it as "two
oh one one" (or possibly "two zero one one") or "two oh double one"; if it
were a plain number, you would say "two thousand and eleven" (USians would
say "two thousand eleven"); as it is a date, you say "twenty eleven". 
(Well, I hope you do.)  You don't read "29th" as "two nine tee aitch" or
even as "twenty-nine tee aitch", but as "twenty-ninth".  Your telephone
number may end "one oh double six", but the battle of Hastings was in "ten
sixty-six": they are spoken differently but written the same. James Bond
wouldn't recognise "zero zero seven".

The normal way of writing your date in British English is "Tuesday 29
November 2011", and you read this as "tuesday the twenty-ninth of november
twenty eleven".  But you are very welcome to format your dates exactly as
you wish, of course - until you get a job where you are required to follow
the accepted system.

Oh, and you don't put a full stop after "29th" in any case: in British
English usage there is no full stop if the end of the original is included
in the abbreviation.  "Prof." has a full stop, but "Mr" and "Dr" do not;
"Rev." has one but "Revd" does not.  Your primary school may well have got
that wrong too.

There are plenty of authorities for all this, but you need to trust proper
style guides, not primary school textbooks.  And there's a reason why you
cannot find any product which follows your teachers' advice!

Brian Barker

-- For unsubscribe instructions e-mail to: users+help@global.libreoffice.org
Problems?
http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be
deleted

Hi :slight_smile:
Bruce, that sounds as though you could easily make an extension for this?  Macros are in Basic but C# is better.  Surely Extensions can be in C#?
Regards from
Tom :slight_smile:

Hi Tom,

I've never done extensions of this sort before and I'd probably need some
help with header files/ libraries etc. and while I don't have a lot of free
time I do love fiddling and I'd love to give it a try. Who knows, I might
even learn something new.

Even if I could get something together that worked say for windows operating
systems I don't think it would be too hard to port that to other systems.

The way I imagine it would work is say for calc you could open the cell
format dialog and select numbers and then date and in the custom edit box
create you personalised format but it would be good if you could then save
that format with a friendly name and make it your default long or short date
format. Maybe that's a bit too much. But that's sort of where we need to go
or at least something along that line.
Even if there were no default options you could select a range of cells and
set the format to "my schmiko long date".

This is an approach that would fit many different cultures and it would be
possible to allow for customisation for ordinals in different languages by
creating an ordinal(number, language) object and for silly old farts like
me, allow for adding specific quoted texts to the custom format.
The ordinal function could become a format style of it's own. Select a cell
- format "Ordinal".

When you think about it we're almost there, we can already create custom
formats but not with ordinals and I don't think it is possible at the moment
to save custom formats.

Do you think this is a feasible and worthwhile project?
If I could get help in getting started I'd most certainly give it a go.
Maybe code samples of other extensions.
I probably should start by downloading the source code for LO but I wouldn't
need all that code.

I started out many years ago programming in assembler but now days I program
almost exclusively for the dot net or mono platforms and I can't even
remember how to spell things like pop, peek, push, poke or jump. :slight_smile: (mmm
I'm not sure --- was there a 'Poke'?)

Cheers,

Bruce Carlson

- "DDDDD" = Day as 2th

One issue would be that “DDDDD” should actually = *2nd*  not *2th* …

Yeah, you're right: 1st, 2nd, 3rd, 4th, ...

ie. it would be /highly/ localization/language dependent to try to indicate
an ordinal rather than just let the number stand on it's own…  if I recall
it would be 2e in French, but I think I've also seen  2me  … so it could be
quite problematic, particularly with any large selection of regions.

In French, you use the ordinal number only for the first day of a
month. For every other day, it's a normal cardinal number.

Hi at all,

creating an extension might be a solution, but in my opinion, it isn't
a good one.

In French dates like "1er décembre 2011", the ordinal number for the
first day of a month isn't an option, it's obligatory. You cannot say
"1 décembre 2011" like LO does. So, LO should offer the possibility
for ordinal numbers without a special extension.

The same for English dates. In classes of students who learn English
as a foreign language, it would be very useful to have a long form of
the English date on worksheets, including "st", "nd", "rd" and "th".
Doug is right that one could simply _write_ and copy the date, but in
my opinion, "fields" are there to ease the work.

Since "DDDDD" could mean in French 1er, 2, 3, 4, 5, 6, ..., it could
be introduced even for English as 1st, 2nd, 3rd, 4th, 5th, 6th, ...

Kind regards,

Julius

Hi,

In reply to Julius.
I understand your explanation and it seems to me that what you are asking for is a permanent correction or addition to an existing function in the French localisation and I'd imagine that that would not be too difficult to do. Although I have no real idea of how the current formats are coded but I appreciate the frustration people using the French localisations must feel.

However your original post on this subject has sparked much interest and has led to other possible adaptations of your original request such as:-

1. multi language ordinal functions. Imagine being able to select a range of cells in calc and setting the format to "ordinal" for any number value.
2 . expanded functionality in creating custom number and date formats including the use of ordinals to allow for people to create their own formats from local custom not only national language.
3. and one I have introduced and that is being able to save custom formats with a friendly name that can be, once saved, selected from the existing format list as and when required.

You may also be correct in these ideas not being solved by an extension but by actually modifying the LO code itself, that is, embedded directly into LO may be a better solution.

However please don't think that these expansions of your original post detract in any way from the importance of your original post because what you have brought to everyone's attention is the need to correct an existing flaw, not to introduce a new function, although in order to do what you have asked does require the creation of some new functions and it is these new functions that has sparked everyone's imagination as to other possible uses .

Bruce Carlson

Hi :slight_smile:
True.  The reason i suggested an Extension is because
1.  someone said they already had some C# coding to do at least part of this
2.  i think it's faster than getting something into the main branch and dealing with all the politics and systems of another group (ie the devs group)
3.  Once something is tested as an Extension it seems that it's a lot easier to pull it into the main branch

We do need more programmers/devs and doing an Extension might help someone work their way into that group.  I think the devs are quite a welcoming bunch and have things such as "Easy Hacks" and a mentoring system to help people learn how to code for LibreOffice (and in general too).  We already have a lot of programmers but there is always room for more.

We are usually mostly short of people in the documentation group and it's documentation that is usually the problem with most OpenSource products but by sheer coincidence quite a few new people have just recently joined so we can look forward to guides for the 3.4.x branch arriving within the next few weeks.

Guides for the 3.3.x branch are at
http://wiki.documentfoundation.org/Documentation/Publications
along with 3rd party documentation.  The French team have an excellent FAQ which a couple of people are trying to translate into English although that is where we are really short of people.

Regards from
Tom :slight_smile: