Xfce Date / Time / Currency / Other Stuff - Format

Some programs, like date, you can change the format quite easily, and others, like thunderbird, seem to either have it already decided or somehow get it from locale or some other setting.

In the handbook, there is a good section on https://docs.freebsd.org/en/books/handbook/l10n/, which seems comprehensive on the outset.

I have been through that a few times, and can get Chinese and Russian working, but that is not what I want.

Amongst other things, I would like the date format to be YY-MM-DD and not MM/DD/YY, and there is nothing in localization that seems to do that - directly.

From what I can gather, YY-MM-DD is the default date format in en_DK, but en_DK is not listed in locale -a. Also, I don't think I would fancy en_DK, as it would set the number format to 1.000.000,00.

I have previously toyed with mate and kde (did not fancy either), but I seem to remember there was somewhere to format various stuff. There is nothing (that I can see) in xfce, or to do it directly with Localization.

So how can I do it?



For those who may believe that Freebsd is only for being a good server, and looks are frivolous: I want both.
 
... I would like the date format to be YY-MM-DD and not MM/DD/YY, ...
Where exactly should the date in XFCE4 be displayed in YY-MM-DD format? If it's x11-fm/thunar it has in the preferences a date format chooser, including 'custom'.

In case of mail/thunderbird the Lithuanian locale can be used to print a YY-MM-DD date:

thunderb-date-col.jpeg


The locale variable can be set in a shell script for example:
Code:
#!/bin/sh

export LC_TIME=lt_LT.UTF-8
exec /usr/local/bin/thunderbird

Further settings to modify the displayed date see Thunderbird 'Date display format, Changing the information displayed'. A user.js file needs to be created:

~/.thunderbird/..default.../user.js
Code:
user_pref("mail.ui.display.dateformat.today", 0);

thunderb-date-col2.jpeg


Note: Value 1 will display YY, month and day in Lithuanian, value 2 will display YY-MM-DD format, value 3 will display YY-MM hour for 'today' YY-MM-DD hour for older, value 4 will display the abbreviation of the day name in Lithuanian.
 
@T-Daemon, very comprehensive.

I had already set the custom date format in thunar.

Have now created the shell for thunderbird. Works a treat.

Used user_pref("mail.ui.display.dateformat.today", 2); only one practical really. Used the Config Editor. Did not work in user.js, but was set and worked in prefs.js.

My great grandma was actually a refugee from Lithuania. Presumably she had to leave because she was not aware of local date format.
 
To set the time/date format independently from the locale you can use LC_TIME, for example LC_TIME=en_DK.UTF-8 with LANG=en_US.UTF-8 to get YY-MM-DD dates but US standards for everything else, including numbers.
 
To set the time/date format independently from the locale you can use LC_TIME, for example LC_TIME=en_DK.UTF-8 with LANG=en_US.UTF-8 to get YY-MM-DD dates but US standards for everything else, including numbers.
That's a better solution. I didn't realize there is misc/locale-en_DK in ports, assumed en_DK.UTF-8 not available from official sources on FreeBSD.
 
That's a better solution. I didn't realize there is misc/locale-en_DK in ports, assumed en_DK.UTF-8 not available from official sources on FreeBSD.
Right, that's why I didn't find it. Instead of speaking Lithuanian, I will be speaking English in a Danish accent.

The documentation is a bit sparse, README.me: "The wonderful en_DK.UTF-8 locale"
 
Back
Top