1

I'm trying to figure out why I can't have any locale working with monday set as first day of the week.

Installed locales:

francescos@Thinkpad-T420:~$ locale -a
C
C.UTF-8
en_GB.utf8
en_IE.utf8
en_US.utf8
it_IT.utf8
POSIX

and while this looks good:

francescos@Thinkpad-T420:~$ LC_TIME="en_US.UTF-8" cal
    January 2019      
Su Mo Tu We Th Fr Sa  
       1  2  3  4  5  
 6  7  8  9 10 11 12  
13 14 15 16 17 18 19  
20 21 22 23 24 25 26  
27 28 29 30 31    

this one looks weird, as it should start with Monday:

francescos@Thinkpad-T420:~$ LC_TIME="en_IE.UTF-8" cal
    January 2019      
Su Mo Tu We Th Fr Sa  
       1  2  3  4  5  
 6  7  8  9 10 11 12  
13 14 15 16 17 18 19  
20 21 22 23 24 25 26  
27 28 29 30 31 

Final surprise, even this one looks terribly wrong:

francescos@Thinkpad-T420:~$ LC_TIME="it_IT.UTF-8" cal
    Gennaio 2019      
do lu ma me gi ve sa  
       1  2  3  4  5  
 6  7  8  9 10 11 12  
13 14 15 16 17 18 19  
20 21 22 23 24 25 26  
27 28 29 30 31  

I have already checked files @ /usr/share/i18n/locales/, and they look good (like they correctly specify the day the week should start from, Monday=2).

My /etc/default/locale looks like this:

#  File generated by update-locale
LANG=en_IE.UTF-8
LANGUAGE="en_IE:en"
LC_MONETARY=it_IT.UTF-8
LC_MEASUREMENT=it_IT.UTF-8
LC_NUMERIC=it_IT.UTF-8
LC_PAPER=it_IT.UTF-8
LC_TIME=en_IE.UTF-8

and this is the output of "locale -a"

francescos@Thinkpad-T420:~$ locale -a
C
C.UTF-8
en_GB.utf8
en_IE.utf8
en_US.utf8
it_IT.utf8
POSIX
francescos@Thinkpad-T420:~$ locale
LANG=en_IE.utf8
LANGUAGE=en_IE:en
LC_CTYPE="en_IE.utf8"
LC_NUMERIC=it_IT.UTF-8
LC_TIME=en_IE.UTF-8
LC_COLLATE="en_IE.utf8"
LC_MONETARY=it_IT.UTF-8
LC_MESSAGES="en_IE.utf8"
LC_PAPER=it_IT.UTF-8
LC_NAME="en_IE.utf8"
LC_ADDRESS="en_IE.utf8"
LC_TELEPHONE="en_IE.utf8"
LC_MEASUREMENT=it_IT.UTF-8
LC_IDENTIFICATION="en_IE.utf8"
LC_ALL=

I've already re-generated locales and rebooted the system.

2

You need to set your locale to the british one for the time display LC_TIME="en_GB.UTF-8" to get your calendar to start on monday.
You can see the configuration in that post here

Set it in the /etc/default/locale depending on your system. /ect/locale.conf

  • This is a clean way. – GAD3R Feb 6 at 17:52
2

Use ncal -M (the -M option is only available for ncal):

sample output:

    January 2019      
Mo     7 14 21 28   
Tu  1  8 15 22 29   
We  2  9 16 23 30   
Th  3 10 17 24 31   
Fr  4 11 18 25      
Sa  5 12 19 26      
Su  6 13 20 27 

The man ncal:

     -M      Weeks start on Monday.

Using cal command , you need to change the line under:

/usr/share/i18n/locales/en_US

from:

LC_TIME
abday    "Sun";"Mon";"Tue";"Wed";"Thu";"Fri";"Sat"

To:

LC_TIME
abday   "Mon";"Tue";"Wed";"Thu";"Fri";"Sat";"Sun"

Then run:

locale-gen

sample output , cal:

    January 2019      
Mo Tu We Th Fr Sa Su  
       1  2  3  4  5  
 6  7  8  9 10 11 12  
13 14 15 16 17 18 19  
20 21 22 23 24 25 26  
27 28 29 30 31
0

try cal -m or cal --monday, see man cal

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.