LyXOutput date-insert format in 2.2.3

Information and discussion about LyX, a WYSIWYM editor, available for Linux, Windows and Mac OS X systems.
Post Reply
paulver
Posts: 2
Joined: Sat Mar 24, 2018 1:28 am

Output date-insert format in 2.2.3

Post by paulver »

Hi - I just updated to Lyx 2.2.3 on Win10. The insert-date now always produces mm/dd/yy instead of dd/mm/yy.
My document is UK English and the converter is set to "python -tt $$s/scripts/date.py %d-%m-%Y > $$o" (although this setting now seems to be ignored).
It's not exactly a big deal, but I'm mystified as to what has changed?

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

scottkosty
Site Moderator
Posts: 542
Joined: Sat Sep 01, 2012 6:38 am

Output date-insert format in 2.2.3

Post by scottkosty »

My guess is that you changed the preference in your old LyX version and you have not yet changed the preference in the new LyX version. See the help for the date-insert function under Help > LyX Function. It suggests changing the format in Preferences under Tools > Preferences > Output > General > Date format.

date.py was used by Insert > File > External Material and chosing "Date". This option is available in 2.2.3 but was removed in 2.3.0.

By the way, I live in the U.S. and I really dislike the M/D/Y format. It makes no sense. On behalf of my country, I apologize that this has become so widespread. Every chance I get (on checks and on any form that does not force a format on me), I enter the date as "Y-M-D" (this is the standard ISO 8601) or "D monthname Y". I cannot enter D/M/Y (even though I like that format) because it would get confused, but the others should be unambiguous, even in the U.S.
paulver
Posts: 2
Joined: Sat Mar 24, 2018 1:28 am

Output date-insert format in 2.2.3

Post by paulver »

Hi Scott - You were absolutely right about the date format needing changing - many thanks.
I'm still puzzled as to what has happened. I keep a preferences file in my "userdir" which I had assumed was a safe way of preserving my preferences across upgrades - is this not correct?

The 2.2.3 LFUN doc just says "The default value (%x) can be set in Preferences->Date format." - your full path description above is far more helpful - can I suggest the doc is updated to reflect this, and alsothat it is this function which is tied to "Insert/Date"? (Apologies if you are the wrong person to address this to.)

Every language has its quirks and we just have to embrace them, but I do agree there seems to be a perverse illogicality about MDY! YMD is definitely a superior standard both sides of the pond - so much more sortable!
scottkosty
Site Moderator
Posts: 542
Joined: Sat Sep 01, 2012 6:38 am

Output date-insert format in 2.2.3

Post by scottkosty »

paulver wrote:Hi Scott - You were absolutely right about the date format needing changing - many thanks.
I'm still puzzled as to what has happened. I keep a preferences file in my "userdir" which I had assumed was a safe way of preserving my preferences across upgrades - is this not correct?
I can see why you would expect that. The reason why the preferences are not automatically transferred on Windows and Mac is explained here and here.
paulver wrote: The 2.2.3 LFUN doc just says "The default value (%x) can be set in Preferences->Date format." - your full path description above is far more helpful - can I suggest the doc is updated to reflect this,
Good idea! Change made here.

If you have ideas for other improvements in LyX, your feedback would be appreciated! For each idea you have, open a new ticket on trac.
paulver wrote: and alsothat it is this function which is tied to "Insert/Date"? (Apologies if you are the wrong person to address this to.)
This can be found through other means. If you go to Insert > Date, look in the bottom left corner. For me, it shows "(date-insert)". That's how you can find out which command is running when you select something from the menu. Or you can go to View > Messages Pane.
Post Reply